MySQL Update Query
UPDATE 'database' SET 'column_1_name' = 'value_1' WHERE 'column_2_name' = 'value_2'
To execute MySQL query in PHP is easy, write the following code and replace CODE with your MySQL query:
<?php mysql_query("CODE"); ?>
Update all rows
UPDATE 'students' SET gender = 'male'
Update one row
This will only effect one row, where id = 2 and only change data to female from male in gender column. All other rows remain the same.
UPDATE 'students' SET gender = 'female' WHERE id = '2'
Next to read
The next is article about MySQL Delete Query, learn how to delete rows from the database.
Generate Thumbnail on the Fly with PHP
In a previous artice I already showed you how to generate square thumbnails with PHP. Now I show you how to keep the original ratio of the image and how to control the alignment of the square image.
Facebook Upload Photo to User′s Profile
Learn how to upload a photo to Facebook user′s profile with PHP SDK via Graph API!
We welcome any comment from you! Please keep in mind that comments are moderated and rel='nofollow' is in use. So, please do not use a domain as your name or a spammy keyword, or your comment will be deleted.