1
我想從外部網頁獲取元標記並將其保存到我的mysql數據庫中,儘管我一直收到錯誤。一些幫助將不勝感激。將元標記字符串插入到mysql表中
$tags = get_meta_tags($_POST['url']);
if (array_key_exists("description", $tags)){
$desc = mysql_real_escape_string($tags['description']);
}
$postQ = mysql_query("INSERT INTO posts (userdesc,desc,title,url,userid) VALUES ('$userdesc','$desc','$title','$url','$userid')");
我不斷收到錯誤是這樣的:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc,title,url,userid) VALUES ('Wow this house is small','We've featu' at line 1
哇,謝謝! – Daniel
@丹尼爾:歡迎您,接受答案,如果幫助 –
+1 –