Gossamer Forum
Home : Products : DBMan : Customization :

Most recent

(Page 2 of 2)
> >
Quote Reply
Re: Most recent In reply to
Thanks, Carol. I will test the exist code some time this week.

Hmm...I guess it works with the exception of the Today value.

Thanks so much.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited August 18, 1999).]

[This message has been edited by Eliot (edited August 18, 1999).]
Quote Reply
Re: Most recent In reply to
Hmm...Well, I tried the exists code and it didn't work. What I noticed after re-reading this Thread for the third time is that the get_date sub-routine you've provided is different than the get_date sub-routine in your bugfix file, which I used to fix the date problems I was experiencing in my records.

So, I created a totally new date sub routine,query_date that is a copy of the codes that you posted in this Thread. I also took out the exists. Still doesn't work...OH, I also tried creating a "blank" value, '' and 0 for new. (Thinking that if I set the first value as "blank" or 0 that when the query string added 1 to new, the result would be 1 day and the Today value would work.) That did not work at all. The drop-down menu was not created.

Hmm...It is quite odd. Logically, the codes look like they will work. But the glitch is in the Today value of 1.

Any other ideas would be great! I have been reading some perl tutorials about query strings and nothing seems to click.

Thanks.

Regards,



------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Most recent In reply to
The difference in sub get_date is the $time variable, which I changed to $time1 so there wouldn't be a conflict with the logging routine.

Try this:

Code:
if ($in{'new'} > 1) {
$in{'DatePosted-gt'} = &get_date(time() - (($in{'new'}+1) * 86400));
}
elsif ($in{'new'} == 1) {
$in{'DatePosted-gt'} = &get_date(time() - 86400);
}



------------------
JPD





Quote Reply
Re: Most recent In reply to
Ah...That may work...

<pondering>
If the new values are greater than 1, then show those new records within a certain period of time.
</pondering>

Didn't think about that! Smile

I will try it.

Thanks for your help.

FYI: I thought that I would point out the differences in date routines so that other people would NOT get confused...Thanks for explaining it to us. I appreciate it.

Smile

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Most recent In reply to
Nope...Doesn't work! Dang! Frown *sigh*

I am wondering if it is a problem with my get_date sub-routine. The codes look like they should work.

May be things will magically fall into place during my vacation next week. That's right! You guys and gals get a break from me for a whole week! Smile I will hopefully be far away from the Net.

Well, Carol, if you or anyone else has some other ideas, I would greatly appreciate them.

Smile

Regards,




------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Most recent In reply to
Before you go on vacation, Eliot (have a good time!), why don't you try setting $db_debug on. That would tell us what the value is for "DatePosted-gt."

(A few minutes later) I am a dolt!

Don't worry about doing any kind of "-gt" for a "Today" search.

(I'm editing this, so I can't see the code. I'll wing it.)

In the "elsif" part of the last code I gave you, just use

Code:
elsif ($in{'new'} == 1) {
$in{'DatePosted'} = &get_date();
}

Duh! (I should have thought of that long before.)

------------------
JPD







[This message has been edited by JPDeni (edited August 19, 1999).]
Quote Reply
Re: Most recent In reply to
Okay, Carol...There seems to be a problem with my date routine(s). I am clueless.

Here is the value for DatePosted I get when I use the exact date codes posted in this Thread:

Code:
DatePosted : 20-Aug-1999

Here is the value for DatePosted I get with the new get_date sub-routine that I installed a few days ago:

Code:
DatePosted : 20-Aug-1999

For the other Last X Days, the values come up like for Last 3 Days:

Code:
DatePosted : 16-Aug-1999

BTW: I have not added any new records into this dummy database since the 18th.

Hope this sheds some light! I will probably be hanging around the forum tomorrow and then it is off to the Rockies for a week.

Smile

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited August 19, 1999).]
Quote Reply
Re: Most recent In reply to
Would you please turn on the debugger, so I can see what's going on? Also, could you repost the URL. I get lost in all the posts.

Did you make the last change I mentioned --

Code:
elsif ($in{'new'} == 1) {
$in{'DatePosted'} = &get_date();
}


------------------
JPD





Quote Reply
Re: Most recent In reply to
Hi Carol,

Still here. The problem is that when you select Today, it shows up records that were added three days ago. It is not functioning properly. I guess I could just take out the Today value. But it would be nice to have people see records added today.

Smile

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Most recent In reply to
That seems to be right. Today is 20-Aug-1999. Your "3 days ago" was a DatePosted-gt, right? That would be anything posted after 16-Aug-1999.

What is the problem?


------------------
JPD





Quote Reply
Re: Most recent In reply to
JPDeni,

I turned on the debugger again. I turned off after I saw the date to report that to you. I had some people inspecting the site last night and today, and I did not want them to be confused with the debug report.

Yes, I did add that new code and it did not work. Frown

The URL is:


http://www.anthrotech.com/cgibin/classifieds/index.cgi?&uid=default


Thanks. Smile

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Most recent In reply to
Since you have taken off the select field for the past x number of days, there's no way I can test it. You might as well turn off the debugger.


------------------
JPD





Quote Reply
Re: Most recent In reply to
The select fields for the Number of Days are there. If you click on "List All Jobs", you will go to the Search Results where there is a quick search at the top of the page.

For instance, try this page:

anthrotech.com/cgibin/classifieds/index.cgi?db=opps&uid=default&vr=1&ID=*&Validate=Yes&sb=1&so=descend

The drop-down (select fields) are near New Search.

I did a search for Today and "Development". These are Form Variables:

Code:
CGI ERROR
==========================================
Error Message : Debug Information
Script Location : /mnt/web/guide/anthrotech/cgibin/classifieds/index.cgi
Perl Version : 5.00404
Setup File : opps.cfg
User ID : default
Session ID : default

Form Variables
-------------------------------------------
Benefits : Development
Category : Development
City : Development
ClosingDate : Development
Comments : Development
Contact : Development
Country : Development
DatePosted : 20-Aug-1999
Email : Development
FaxNum : Development
ID : Development
JobDescrip : Development
MailAddress : Development
ModifiedBy : Development
Organization : Development
Permission : Development
Position : Development
RemoveAd : Development
Salary : Development
State : Development
TelNum : Development
Type : Development
Validate : Development
WebSite : Development
ZipCode : Development
db : opps
keyword : Development
ma : on
new : 1
sb : 1
so : descend
uid : default
vr : 1~~Search

Smile

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited August 20, 1999).]
Quote Reply
Re: Most recent In reply to
Okay. Now I know what the problem is.

When you use a keyword search, the "Match Any" option is set.

I first did a search for "Today" and got the result I would expect -- the one job that was added today.

Then I did a search for "Today" and keyword "Development" as you suggested. It came back with all records (1) that were added today, plus the records (1) that have "Development" in a field.

This is what it is supposed to do. There is no way to do a keyword search and not have it "Match Any."

------------------
JPD





Quote Reply
Re: Most recent In reply to
Ah...That is the answer...I guess what I can do is put a most common field, such as position, and use that for the short search form. (Or possible take out the search blank in the short search form.)

Smile

Thanks for your patience and time.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
> >