close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Search filter: SQL syntax and WebAssist application

Thread began 3/23/2021 9:29 pm by Dragan | Last modified 3/30/2021 9:29 am by Dragan | 379 views | 11 replies


Search filter: SQL syntax and WebAssist application

I need your advice how to create a search field to be able to filter only those advertisements that
a) were posted in the last X-number of days, and
b) which expiry date is greater than today’s date.

The search filed is a Menu/List drop-down box with alternatives 1, 3, 7, 14, 21 and 28 days. I tried the below SQL statement
SELECT ads.updated, ads.expires
FROM ads
WHERE (DateDiff("d",updated,Date())<=10) AND expires>Date();

Number 10 is just for testing purposes. It will be dynamic, replaced with the input from the above Menu/List box. However, the SQL is not working in the Recordset Query Builder. I get message
“You have an error in your SQL syntax; check the manual that coresponds to MariaDB server version for the right syntax to use near "))<=10) AND expires>Date()" at line 1.”

Even if SQL was working, I would not know what to do with it. I need from you detailed instructions on how to create such a search filter. Please help me, as I do not have other options to solve the problem.

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





Ease of use


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