-1
我收到了未定義的索引通知,但無法弄清楚如何解決該問題。正在修改未定義的索引通知
Notice: Undefined index: id in /home/jharvard/vhosts/localhost/html/book_details.php on line 10
此處所說的有問題的代碼:
// query for the listing
$listing = query("SELECT name, author, id, edition, price, course, date FROM books WHERE submission = ?", $_GET["submission"]);
// query for the email of the seller
$seller = query("SELECT email FROM users WHERE id = ?", $listing["id"]);
誰能幫助?非常感謝你。
我敢打賭'$ listing'中沒有''id「''。 – nkr
是查詢自定義函數還是屬於特定的數據庫庫?嘗試使用'print_r($ listing)'來查看'$ listing'具有的值。 – Jrod
什麼是query()?它是否返回查詢的*結果*? –