Mysql query

Does anyone see anything wrong with this query? Do I have one of the >, =
or < mixed up? The purpose is to figure out if it is within 14 days of
Christmas AND if there is content for Christmas available. 2 is symbolic
in the database being Christmas. Ron


IF( CURDATE( ) >= DATE_SUB( DATE(2009-12-25) , INTERVAL LEAST( 14, (
SELECT COUNT( * ) FROM `verse_of_the_day_Bible_verses` WHERE seasonal_use
=2 ) ) DAY ) AND CURDATE( ) <= DATE(2009-12-25) , 2, 0 )


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ron.piggott [ Mo, 14 Dezember 2009 00:00 ] [ ID #2025770 ]
PHP » gmane.comp.php.database » Mysql query

Vorheriges Thema: EZPDO Replacement
Nächstes Thema: Combing PDO with mysql_pconnect connections in one application --will this degrade performance?