Jump to content

Problem with selecting between two dates


kts

Recommended Posts

My select statement:

 

select DATE_FORMAT(affiliate_date,'%m/%d/%y') as afdate from affiliate_sales WHERE afdate >= '2009/6/23 00:00:00' AND afdate<= '2009/7/23 23:59:59' 

 

Works when used in phpmyadmin, but when processed by the form, says there are no results.....

 

Any ideas?

Obviously when you run it through phpmyadmin you replace the variables with actual values and this is when it works.  Therefore the problem must be with the value of the variables in the query on your script.

 

Try echoing out the variables prior to running the query to see if they have the values you expect.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.