Jump to content

Not filtering Results


Recommended Posts

Hi everyone, I need to select rows from my database where intradelete = 1 and between 2 sets of dates only its selecting everything, the intradelete = 1 doesnt seem to be working, can anybody see why? heres my query

 

SELECT *
FROM worksorders
WHERE worksorders.intradelete = 1 BETWEEN '$startdate' AND '$enddate' 

 

and heres my startdates

<?php $startdate = date('Y-m-d', strtotime ("last Sunday"));
$enddate = date('Y-m-d', strtotime ("next Friday"));

?>

Link to comment
https://forums.phpfreaks.com/topic/203083-not-filtering-results/
Share on other sites

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.