Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 184
  • Last Modified:

Search Results Problem

I'm using DWMX / PHAKT / PHP / MySql.  I've set up a search query as shown below. When I test the 'DateListed' field with a real date, such as 2004-09-10, in the recordset Server Behavior window, it works fine.  But, when I run the same DateListed query from the actual search page, it produces no records on the result page.  All the other variables work fine on the results page.  

SELECT* FROM projects WHERE county LIKE '%varcounty%' AND license LIKE
'%varlicense%' AND DateListed >= 'varlisted'

Variables:
Name         Default        Run-time Value
varcounty    %                $HTTP_GET_VARS['county']
varlicense    %                $HTTP_GET_VARS['license']
varlisted      %                $HTTP_GET_VARS[listed]

What am I doing wrong?  Any help would be greatly appreciated.


Richard T

0
grnt
Asked:
grnt
1 Solution
 
rockmansatticCommented:
This is not a Dreamweaver question, you would yeild better results in sql or Mysql section of EE.

BUT,
possibly change $HTTP_GET_VARS[listed] to $HTTP_GET_VARS['listed']

but the real problem looks like it lies in the data stored in that variable.  I would bet that it is not in the correct format YYYY-MM-DD as your test is in.

Rockman
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now