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

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!
?>



ASK A QUESTION

More mysql PHP Questions

Why does this code not work? Returns this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND ClaimNo = AND UserName = john' at line 2

How do I find the longest value in my mysql table?

How do I connect to mySQL from PHP?

How do I find second highest value from a table?

I tried to do query,but it didnt work i receive an error message arning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in



Custom Search