Parse error: syntax error, unexpected 'from' (T_STRING), expecting ']' in C:\wamp\www\facebook\newfeed.php on line 8
我不知道什么是错误,我的查询在我在WAMP中测试时起作用。我需要帮助。
require("opendb.php");
$userid = (int) $_SESSION[`fb128_userid];
$query = mysql_query (" SELECT * FROM posts WHERE userid= ANY (
SELECT `from` as id FROM friends WHERE `to`= $userid and status='Confirmed' UNION
SELECT `to` as id FROM friends WHERE `from`= $userid and status='Confirmed')
ORDER BY date_created DESC LIMIT 1,10");
require("closedb.php");
$promt = "";
while(list($id,$userid,$from,$content,$date_created) = mysql_fetch_array($query)){
$promt .="
";
$promt .='
'.substr($content,0,150)."...see more
";$promt .=" like | ";
$promt .="Comment |";
$promt .= "
| Date Created: $date_created
";$promt .="
";
}
?>
NewsFeed
2012-09-23
binaryjc