phpmyadmin可执行下列SQL查询
update history set comment=concat(comment,'<a href="detail" target="_blank">
查询流程</a>') WHERE `status_id`=1 and comment LIKE '%结果 : Succeeded.%'
and `date_added`>= curdate()
但相同语法置于.php执行会出现错误
<?php
$username="username";
$password="password";
$dbname="database";
$dbhost="localhost";
$query="update history set comment=concat(comment,'<a href="detail" target
="_blank">查询流程</a>') WHERE `status_id`=1 and comment LIKE '%结果 :
Succeeded.%' and `date_added`>= curdate()";
mysql_connect($dbhost,$username,$password);
@mysql_select_db($dbname) or die(strftime('%c')." Unable to select database");
mysql_query($query);
mysql_close();
echo strftime('%c')." ok!";
?>
还请各位版大指教~感谢!