MySQL Delete Query
DELETE FROM 'table_name'
To execute MySQL query in PHP is easy, write the following code and replace CODE with your MySQL query:
<?php mysql_query("CODE"); ?>
Delete all rows
This will delete all rows from students table.
DELETE FROM 'students'
After all rows deleted, students table will be empty.
Delete only one row
This will delete only one row, where first_name is Ronald.
DELETE FROM 'students' WHERE 'first_name' = 'Ronald'
Delete more rows
Remember, if the value is string, it has to be put between ' ' to work, for numbers ' ' do not needed.
DELETE FROM 'students' WHERE 'first_name' = 'Lara' OR 'id' = 3
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.