Updating multiple fields mysql

06-Oct-2017 11:20 by 2 Comments

Updating multiple fields mysql - Live cam chat bangkong

I just find it odd that if I run it through Query Browser it works fine, yet misbehaves solely in PHP. If you need to see my other functions, I can post them too but as there are no errors reported, and since the value in the database does change, I have to assume there's no connection problems or what not.

Change the accountstatus field from 'Grey' to 'Brown' indicating they are no longer in the Validating user group. Send the user their Registration Is Complete e-mail. And yeah, I figured maybe it was a silly mistake with the field name or something but the column is indeed named accountstatus, and its the same field type and length as confirmcode, and has no special properties or anything aside from a default value.I've changed urlencode to htmlentities but that hasn't helped, any ideas ?Thanks, Jon If your ID is an integer, you shouldn't need quotes around $ID.But you can check what are the values you are supplying, what are the table column data type, check are you sending null values or not, you may need to convert data to the right type.Try to print the query with echo $query_string_variable Then execute the query in the database by itself [not from PHP You can also try the other way...to write a query by providing static values and run the query into the database. Why are you using single quotes around the variables in your queries? When i use three seperate UPDATE commands, one for each column, FUNNILY, the first and the third columns get updated, and for some GOD KNOWS WHAT reason, the second column just refuses to change...

when i use a single UPDATE-SET command(using commas/AND etc etc.... only the first field gets updated, the other 2 remaining as they are.Also, putting stuff into the database, you probably want to add slashes rather than stripping them.PHP should automatically decode the query string into plain text (removing and other such special characters and converting them back into spaces, quotes, etc.).(And your ID should probably be an auto-incremented ingeter unless you've got another primary key set that fills this role.) Note also that you don't need a "SET" for each column.Use SET and then give a comma-delimited name=value listing of updates. If you omit the WHERE clause, all records in the table will be updated!

  1. eku edewor dating sites 11-Jun-2017 20:24

    JW's don't believe they are going to heaven unless they're part of the 'anointed class'.