Solved

Search Results Problem

Posted on 2004-09-23
1
177 Views
Last Modified: 2010-04-25
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
Comment
Question by:grnt
1 Comment
 
LVL 10

Accepted Solution

by:
rockmansattic earned 125 total points
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now