php - Field email not updating in MySQL table (using PDO) -


i have query running on site updates user's profile. updates every field but email field should. it's not doing @ email field.

i define $email variable such:

$email = str_replace(" ", "", trim($_post['email'])); 

and use database wrapper update it:

mysql::do_query(     $db,      "update customer      set          email=?,         firstname=?,          surname=?,          phonenumber=?,          street_address=?,          postcode=?,          city=?,          extra_2=?,         ssn=?,         password=?     customer_id=?      , password=?",      array($email, $firstname, $surname, $phone, $address, $zip, $city, $extra_2, $ssn, stringconverter::generate_hash($email, $_post['pw']), $customer, stringconverter::generate_hash($email, $_post['pw'])) ); 

but, problem, doesn't update email field. every other field updates fine. i've tried running separate query updating just email, doesn't work either.

it works fine when inserting, not updating. , point have no idea wrong. , $email variable holds correct email address, although query seems ignore it. ideas?

have tried updating multiple things along email? i'm guessing not, because think if change email, entire update not perform correctly... because use $email in stringconverter::generate_hash($email, $_post['pw']), if email changed, row won't meet password check in clause.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -