Problems with using SQL Between
Posted: Tue Aug 03, 2004 9:40 pm
I have a SQL query as the one below =>
What happens is that the query returns ALL the records that fulfill "salesPerson1 > 1 and finalPayment != 0" but the "finalPaymentDate between $month and $nextMonth" is not being applied at all.
finalPaymentDate is being stored as a timestamp number in the database
Code: Select all
<?php
$query = "select ID, source, finalPayment, salesPerson1 from Invoice where salesPerson1 > 1 and finalPayment != 0 and finalPaymentDate between $month and $nextMonth";
?>finalPaymentDate is being stored as a timestamp number in the database