PHP Questions Home | Register | Login
Categories
Arrays
Files
Forms
Creating PDFs
PHP Errors
Functions
Images
MySQL
Numbers
Others
Strings
Website
Unanswered

PHP Forums
Forums Index
MySQL Forum
PHP Forum
Flash/Actionscript
Javascript
Web design

More PHP
PHP Functions
Top Questions
Ask a Question
PHP Interview Questions
PHP Jobs
Ecommerce
IT Questions
Business Websites

Sponsors

sponsor ad
My Salary
PHP Developer Salary
Advertise Here

How do I delete a row from a table?


This is done using the DELETE command.

And unlike recycle bins and dodgy deletion of data on PCs, when you DELETE it is gone!

Here is how you do it:

<?php
$query 
"DELETE from mytable";
//when you run that, it's gone!

//notice that you DON'T do this
$query "DELETE * FROM mytable";//error!
?>



Comment on this Question and Answer >>>

ASK A QUESTION

More mysql PHP Questions

What is difference between mysql_fetch_array and mysql_fetch_object?

how do i upload an image to database?

How do I insert the date into my table?

the code is running well without errors but y is it that three of the columns in the table do not insert data?

How do I update the contents of a table row?



Custom Search