Hi ,

i have used some gui tools to generate my php code from database and i need some help with the search form.

basically the tools only created the search of dates in US format so someone had to write a cusotm function for it to display as UK but submit as US date.

the code is :

$WADbSearch1->addComparisonFromEdit("TaskDueDate","S_TaskDueDate","AND","=",2);
  $WADbSearch1->addComparison("App1DOB","".((isset($_GET["S_date2"]))?uk_to_us_date($_GET["S_date2"]):"")  ."","AND","<=",2);

the second line works if it is a date range but i just need it to be exact match of the taskduedate, how can i use the code uk_to_us in my first line of code?

many thanks

Recommended Answers

All 3 Replies

Try the following (if "S_TaskDueDate" is in your $_GET array):

$WADbSearch1->addComparisonFromEdit("TaskDueDate",uk_to_us_date($_GET["S_TaskDueDate"]),"AND","=",2);

sorry did not work i added the line you gave but no joy.

thanks anyway

Try changing the function call from addComparisonFromEdit to addComparison .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.