Updating multiple columns of a table marta toren dating

THE CODE $qur= "update `users` set `username`='".$_POST['username']."', `password`='".$_POST['password']."', `name`='".$_POST['name']."', `email`='".$_POST['emailid']."', `phone`='".$_POST['phoneno']."', `country`='".$_POST['country']."', `county`='".$_POST['county']."', `city`='".$_POST['city']."', `pincode`='".$_POST['zip']."', `shipping`='".$_POST['shipping']."', `billing`='".$_POST['billing']."', `organisation`='".$_POST['org']."', `fax`='".$_POST['fax']."' where id=".$_GET['id']; mysql_query( $qur) ; i tried using a common update command, but when i use it with mysql_error(), it reports the following error: You have an error in your SQL syntax, check the manual that corresponds to your My SQL server version for the right syntax to use near 'mod = '77' ,yod='8899' where ID =56 at line 1. and then the table (with the 'date' and 'year' column updated, but the 'month' column as it is...).. 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.

updating multiple columns of a table-42updating multiple columns of a table-40updating multiple columns of a table-37

clause allows you to update data in one or more columns determined by a list of comma-separated assignments.

Each assignment specifies a column name on the left side the assignment operator (=) and a literal value, an expression, or data from a subquery on the right side of the assignment operator.

But the right-hand side (hereafter "RHS") must be a subquery expression.

Suppose an application wants to display a list of contacts in alphabetical order by lastname, firstname, in a scrolling window that can only show 7 contacts at a time.

Secondly you have shown me to update table with "KEY PRESERVED" method. IT NEEDS THIS LOGICALLY regardless of the method used, so just add it (for if a row in OLD joins to more than one row in NEW -- you are hosed, you cannot update this data, therefore NEW has a unique/primary key, add it to facilitate the update) I had a similiar query and i tried applying to my tables.

Last modified 15-Dec-2019 05:51