close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Orders Search page search by date not working

Thread began 9/17/2015 5:44 pm by Mark | Last modified 9/18/2015 1:14 pm by Ray Borduin | 247 views | 4 replies |

Mark

Orders Search page search by date not working

I'm trying to pull up a daily report for orders. Everything on the orders_search.php page is working perfectly except the date. I always comes back "No Results". I noticed that the "OrderDate" field that it is querying has a timestamp as well as the date. If I search an OrderDate with the exact timestamp appended, it will come back with that specific order. However, I want all the orders for that day. Is there a way for the search function to ignore the timestamp?

Sign in to reply to this post

Ray BorduinWebAssist

Can you attach a copy of the search page and results page so I can look at the code?

Sign in to reply to this post

Mark

Here they are.

Attached Files
orders_results.php
orders_search.php
Sign in to reply to this post

Ray BorduinWebAssist

I think your best option is to do a date range search and put in the time... so if you delete line 44 from your results page and replace it with:

$WADbSearch1->addComparison("OrderDate","". (isset($_GET['OrderDate'])?date('Y-m-d 00:00:00',strtotime($_GET['OrderDate'])):"").  "","AND",">=",2);
$WADbSearch1->addComparison("OrderDate","". (isset($_GET['OrderDate'])?date('Y-m-d 23:59:59',strtotime($_GET['OrderDate'])):""). "","AND","<=",2);


That should do the trick.

Sign in to reply to this post

Mark

That did the trick. Thanks again Ray!

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...