$abc = mysql_fetch_array($result); if (!$result) die("Error: Data not found.."); $name=$abc['name'] ; $email= $abc['email'] ; $sql = "UPDATE example SET name ='$name', email ='$email' WHERE id = '$id'"; if(mysql_query($con, $sql)) //Error Echo "Record Update successfully"; else Echo "ERROR: could not able to execute $sql".mysql_error($con); mysql_close($con);
mysql_query()期望參數1是字符串,給定的資源//這是錯誤 –
'mysql_query($ sql,$ con)' – smoqadam
1錯誤解決thnks,&另一個錯誤=無法執行更新示例SET name ='',email =''WHERE id ='19'Table'test.example'does not exist –