Parse error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following code gives me this error message:

Parse error: syntax error, unexpected ':'
in /home/thev4173/public_html/test.php on line 8

It is referencing the : that follows EasterDate (and will eventually get
mad at ChristmasDate)


mysql_connect('localhost',$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

IF(CURDATE() >= DATE_SUB(CONCAT(@EasterDate :=
DATE(FROM_UNIXTIME(easter_date(date('Y'))), INTERVAL LEAST(14, (SELECT
COUNT(*) FROM `verse_of_the_day_Bible_verses` WHERE seasonal_use = 1))
DAYS) AND CURDATE() <= @EasterDate, 1, 0)

IF(CURDATE() >= DATE_SUB(CONCAT(@ChristmasDate := YEAR(CURDATE()),
'-12-25'), INTERVAL LEAST(14, (SELECT COUNT(*) FROM
`verse_of_the_day_Bible_verses` WHERE seasonal_use = 2)) DAYS) AND
CURDATE() <= @ChristmasDate, 2, 0)

mysql_close();



What is the problem?

And what is the variable that has the value of 0, 1 or 2?

Ron


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux