close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Search Date is not working

Thread began 7/12/2010 12:15 pm by tn228553 | Last modified 7/14/2010 10:44 am by Jason Byrnes | 2142 views | 7 replies |

tn228553

Search Date is not working

in my search form I have 3 date fields setup to search 3 columns in my table (sBookDate, sReleaseDate, sBirthDate). I have tried changing the columns from varchar to date format with no luck. For some reason it is ignoring any of those search elements. Attached is the search form and results form. Can you please take a peek and tell me what I am doing wrong? I could have sworn I had this working and something has obviously changed.

Thanks in advance!

Attached Files
Results.zip
Sign in to reply to this post

Jason ByrnesWebAssist

on the results page, you are using the variables:
$sBookDate
$sReleaseDate
$sBirthDate



in the data assist search behavior, but these variables are not defined any where.


you need to add code to create the those variables used the combined values from the select list list.

Sign in to reply to this post

tn228553

Hi Jason,

I thought this was what lines 32,33, and 34 did on the results page:
$WADbSearch1->keywordComparison($KeyArr4,"".((isset($sBookDate))?$sBookDate:"") ."","AND","Includes",",%20","%20","%22","%22",0);
$WADbSearch1->keywordComparison($KeyArr5,"".((isset($sReleaseDate))?$sReleaseDate:"") ."","AND","Includes",",%20","%20","%22","%22",0);
$WADbSearch1->keywordComparison($KeyArr6,"".((isset($sBirthDate))?$sBirthDate:"") ."","AND","Includes",",%20","%20","%22","%22",0);

What else do I need to add? Thanks!

Sign in to reply to this post

Jason ByrnesWebAssist

you are just using the variables in those lines, there needs to be code before those lines that assigns those variables values.

For example, the booking date is comprised of three select lists named "Month", "Day" and "Year"


you need to add code to create the $sBookDate variable using the three select lists:

php:
$sBookDate = "".isset($_POST["Month"]))?$_POST["Month"]:""."/".isset($_POST["Day"]))?$_POST["Day"]:""."/".isset($_POST["Year"]))?$_POST["Year"]:""."";
Sign in to reply to this post

tn228553

Okay, I think I understand. Where should I place the code? I tried to add it as a test directly underneath $KeyArr6 = array("Birth_Date"); but its giving me a white screen now? Thanks for you help on this!

Sign in to reply to this post

Jason ByrnesWebAssist

sorry, light syntax error in the previous code, use this instead:

php:
$sBookDate = "".(isset($_POST["Month"])?$_POST["Month"]:"")."/".(isset($_POST["Day"])?$_POST["Day"]:"")."/".(isset($_POST["Year"])?$_POST["Year"]:"")."";
Sign in to reply to this post

tn228553

Awesome, thanks for the help Jason!

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...