I am a newbie to PHP and have searched this site and Google for this error and have found many references but no solutions, please forgive if this has been addressed before.
I have PHP5 / Apache2 on a Windows XP Pro machine with MySQL installed and enabled. The following information is from phpinfo():
System Windows NT AP01-XXX-505 5.1 build 2600
Build Date Sep 5 2005 15:50:13
Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"
Server API Apache 2.0 Handler
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\PHP\php.ini
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 4.1.7
Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off
Here is the error:
Parse error: parse error, unexpected T_VARIABLE in C:_JCH\Websites\Apache\dashboard\wbw_sales1.php on line 7
Here is the code:
$query = "SELECT DATE_FORMAT(INV_DATE, '%Y %m') AS 'YEAR/MONTH', "
. "DATE_FORMAT(INV_DATE, '%m') AS 'MONTH', "
. "DATE_FORMAT(INV_DATE, '%Y') AS 'YEAR', "
. "format(sum((UT_PRICE MULTIPLIER) INV_QTY),0) as 'GROSS SALES', "
. "format(sum(((UT_PRICE MULTIPLIER) - UT_COST) INV_QTY),0) as 'NET SALES' "
. "FROM wbw_line GROUP BY 'YEAR/MONTH' ORDER BY 'YEAR/MONTH' DESC LIMIT 12;";
Any help with this error will be greatly appreciated.
Thanks,
Charles