[請益] 無法存到資料庫

看板PHP作者時間17年前 (2008/05/05 15:50), 編輯推噓2(200)
留言2則, 2人參與, 最新討論串1/7 (看更多)
$firm_id = $_POST["q1_01_02"]; $password = $_POST["password"]; $project_rows = $_POST["project_rows"]; $name_chinese = $_POST["q1_01_01"]; $boss = $_POST["q1_01_03"]; $contact = $_POST["q1_01_04"]; $email = $_POST["q1_01_05"]; $phone = $_POST["q1_01_06"]; $fax = $_POST["q1_01_07"]; $address1 = $_POST["q1_01_08"]; $address2 = $_POST["q1_01_09"]; $website = $_POST["q1_01_10"]; $year_founded = $_POST["q1_01_11"]; $stock = $_POST["q1_01_12a"]; $stockstatus = $_POST["q1_01_12b"]; $stock_year1 = $_POST["q1_01_12b1"]; $stock_year2 = $_POST["q1_01_12b2"]; $sql = "UPDATE firm SET name_chinese='$name_chinese', boss='$boss', contact='$contact', email='$email', phone='$phone', fax='$fax', address1='$address1', address2='$address2', website='$website', year_founded='$year_founded', stock='$stock', stockstatus='$stockstatus', stock_year1='$stock_year1', stock_year2='$stock_year2' WHERE firm_id='$firm_id'"; mysql_query($sql, $link_ID); 資料庫那邊也設好了 到底是哪裡出了問題 我記得有檢測這個變數是否有傳回資料到資料庫的指令 acho什麼的 感謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.119.233.32

05/05 15:52, , 1F
使用 echo mysql_error(); 看看
05/05 15:52, 1F

05/05 15:53, , 2F
先把所有欄位補上 `` 再說
05/05 15:53, 2F
文章代碼(AID): #187hnAba (PHP)
文章代碼(AID): #187hnAba (PHP)