Jump to content

Fail to input dataColumn count doesn't match value count at row 1


Taku

Recommended Posts

if(isset($_POST['Edit']))
{
echo "Success";
$u_cl = mysql_real_escape_string($_POST['clt']);
$u_c = mysql_real_escape_string($_POST['ct']);
$u_cb = mysql_real_escape_string($_POST['cbt']);
$u_cc = mysql_real_escape_string($_POST['cct']);

if(!$u_cl OR !$u_c OR !$u_cb OR !$u_cc)
{
echo '<script type="text/javascript">alert("Please fill up the form")</script>';
require "custodian_edit.php";
}
else
{
$query1 = "UPDATE $tbl_name SET Cafe_Latte='$u_cl', Chocolate='$u_c', Creme_Brulee='$u_cb', Cookies_Cream='$u_cc' WHERE inven_id = 1";

mysql_query($query1) or die('error'.mysql_error().'in query'.$SQL);
echo "Record Update";
}
}

 

anyone knows what I did wrong? I am trying to update the 1st row and it is not working...

and while you define not working, you may also want to define $tbl_name....

 

:tease-01:

I was going to ask that, but if it were undefined it should trigger the error, printing out the SQL, making it obvious.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.