Posted: Wed Sep 06, 2006 8:05 am
This UPDATE statement does not update anything but does not raise an error either?
That's strange. Since there's no WHERE clause it should update ALL records with the given values.
What does that print?
That's strange. Since there's no WHERE clause it should update ALL records with the given values.
Code: Select all
function updateuser($username, $password, $first_name, $maiden_name, $last_name, $address_line1, $address_line2, $town, $county, $postcode, $daytime_phone, $mobile_phone, $evening_phone, $email_address) {
global $link;
$query = "UPDATE `users` SET `first_name`='$first_name', `maiden_name`='$maiden_name', `last_name`='$last_name', `address_line1`='$address_line1', `address_line2`='$address_line2', `town`='$town', `county`='$county', `postcode`='$postcode', `daytime_phone`='$daytime_phone', `mobile_phone`='$mobile_phone', `evening_phone`='$evening_phone', `email_address`='$email_address'";
echo '<div>Debug: ', $query, '</div>';
$result=mysql_query($query, $link) or die("Died inserting login info into db. Error returned if any: ".mysql_error());
return true;
}