Re: Parse error

From: Date: Thu, 24 Sep 2009 07:17:15 +0000
Subject: Re: Parse error
References: 1 2 3 4 5 6  Groups: php.db 
Request: Send a blank email to php-db+get-46543@lists.php.net to get a copy of this message
There are further problems with the mySQL query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND CURDATE() <= DATE(FROM_UNIXTIME(1239508800)), 1, 0), IF(CURDATE() >= DATE' This is the whole query, what am I missing / doing wrong? SELECT GREATEST( IF(CURDATE() >= DATE_SUB(CONCAT(DATE(FROM_UNIXTIME(1239508800)), INTERVAL LEAST(14, (SELECT COUNT(*) FROM verse_of_the_day_Bible_verses WHERE seasonal_use = 1)) DAY) AND CURDATE() <= DATE(FROM_UNIXTIME(1239508800)), 1, 0), IF(CURDATE() >= DATE_SUB(CONCAT(YEAR(CURDATE()), '-12-25'), INTERVAL LEAST(14, (SELECT COUNT(*) FROM verse_of_the_day_Bible_verses WHERE seasonal_use = 2)) DAY) AND CURDATE() <= YEAR(CURDATE()), '-12-25'), 2, 0) ) AS verse_application On Thu, 2009-09-24 at 15:39 +1000, Chris wrote: > Ron Piggott wrote: > > Let me try this is a different way. > > > > What is the variable which I am able to retrieve? I am expecting the > > result to be a 0, 1 or 2. > > Your original problem was getting a parse error. > > Your query is not php code - step 1 is to fix that. > > Once you've done that, post the new code and new problem you're having. >

« previous php.db (#46543) next »