it worked for a simpler mysql script but not the one i'm intending to use. there is something wrong with the sql query or the way i wrote in the php script. the script right now is:
Code:
<?php
$con = mysql_connect("localhost","root","iwfcti4743");
if (!$con)
{
die('Could not connect:' . mysql_error());
}
mysql_select_db("mailscanner", $con);
$result = mysql_query("select COUNT(*) as 'AllMSG' from maillog where to_domain="ctiemail.com" AND MONTH(date) = MONTH(CURRENT_D)");
while($row = mysql_fetch_array($result, MYSQL_ACCOS))
{
echo $row['ALLMSG'];
}
mysql_close($con);
?>
when i look at /var/www/httpd/error_log, it comes back with this:
Code:
[client 127.0.0.1] PHP Parse error: parse error, unexpected T_STRING in /var/www/html/test.php on line 10
i tried what you mentioned with much simpler queries and it worked. my problem now is obviously on the $result line...
i would appreciate further help and thanks in advance