help with MySQL update query
Posted: Thu Aug 04, 2005 8:12 am
Hello,
I am trying to update a simple address book. Below is the query string
when I print out the query there are no single quotes around the Key in that (following is the query that is passed to MySQL)
The second single quote which encloses DAGH is missing. I cant seem to figure out what is wrong with the query. ANy help is appreciated.
Thanks
Azak
feyd | Please use
I am trying to update a simple address book. Below is the query string
Code: Select all
$query = "update $db_name set
Work_Place = '$WorkPlace',
Work_State = '$WorkState',
Work_Country = '$WorkCountry',
Home_Phone = '$HomePhone',
Cell_Phone = '$CellPhone',
Other_Phone = '$OtherPhone',
Home_Address = '$HomeAddress',
Home_State = '$HomeState',
Home_Country = '$HomeCountry',
email = '$email',
webpage = '$webpage',
notes = '$notes'
Where Log_Name = '$key2' ";when I print out the query there are no single quotes around the Key in that (following is the query that is passed to MySQL)
Code: Select all
update contactlist set Work_Place = 'Some name', Work_State = 'DC', Work_Country = 'US', Home_Phone = '', Cell_Phone = '', Other_Phone = '', Home_Address = 'some address', Home_State = 'DE', Home_Country = 'US', email = '', webpage = '', notes = '' Where Log_Name = 'DAGHThanks
Azak
feyd | Please use
Code: Select all
tags in the future to post php code.[/color]