Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
How To Delete Existing Rows in a Table
How To Delete Existing Rows in a Table? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts
✍: FYIcenter.com
If you want to remove a row from a table, you can use the DELETE statement with a WHERE clause to identify the row. The following sample script deletes one row:
<?php include "mysql_connection.php"; $sql = "DELETE FROM fyi_links WHERE id = 1102"; if (mysql_query($sql, $con)) { print(mysql_affected_rows() . " rows deleted.\n"); } else { print("SQL statement failed.\n"); } mysql_close($con); ?>
If you run this script, you will get something like this:
1 rows deleted.
2007-05-11, 4874👍, 0💬
Popular Posts:
What CLASSPATH Settings Are Needed to Run JUnit? It doesn't matter if you run your JUnit tests from ...
How do we assign page specific attributes ? Page attributes are specified using the @Page directive.
What will be printed as the result of the operation below: main() { int x=20,y=35; x=y++ + x++; y= +...
What is the quickest sorting method to use? The answer depends on what you mean by quickest. For mos...
Explain in detail the fundamental of connection pooling? When a connection is opened first time a co...