关于双引号和单引号多层嵌套
原SQL语句:
$sql = "update cdb_posts set subject='$subject' where pid='$pid'";
有一个变量是:
$backurl = "article_list.php?mode=" . $mode . "&clsid=" . $clsid. "&mp=". $mp;
现在要改变SQL语句,使插入的字符串成为一个链接:
$sql = "update cdb_posts set subject='<a href=' . '"' . 'article_list.php?mode=' . $mode . '&clsid=' . $clsid . '&mp=' . $mp . '"' where pid='$pid'";
但提示错误:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING
这个错误怎么解决呢?这个SQL语句该怎么写呢?