Log in

View Full Version : How to Update table with more fields?



toplisek
10-25-2006, 01:19 PM
I need to update table with the following structure:
values ('','','', '$fname', '$lname',
'$street', '$city', '$state',
'$province','$country','$postcode',
'$phone','$email','$gender',
'$birthyear', '$service',
'$username', '$password','$password1','$cryptpswr','','','','','','','','','','','$alteredd','$alteredt')

How to do correct code for query SET if I have more fields in table and not one?

thetestingsite
10-25-2006, 04:16 PM
modify and try this to your liking:



$variable = mysql_query("UPDATE `mytable` SET `column1`='$column1', `column2`='$column2' WHERE `fname`='$fname' AND `lname`='$lname'");

toplisek
10-26-2006, 10:36 AM
thank you