mysql date select statement

From: Date: Mon, 18 Aug 2003 04:07:43 +0000
Subject: mysql date select statement
Groups: php.db 
Request: Send a blank email to php-db+get-29929@lists.php.net to get a copy of this message
Hello all, I have this page where I search and add up commissions in a mysql database. I want to select commissions between a certain date range. This is what im currently using but it does not seem to work. $from="20030101"; $to="20031230"; $search=mysql_query("SELECT SUM(amount) FROM commissions WHERE date BETWEEN '$from' AND '$to'"); Thanks in advance for any help wendell

« previous php.db (#29929) next »