Removing From MySql
| From: | Robby Whiteside | Date: | Thu, 26 Oct 2000 16:37:24 +0000 |
| Subject: | Removing From MySql | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-22163@lists.php.net to get a copy of this message | ||
How do I delete from a mysql table. I need more snip of code but I don't know it.
Here's my code
<?
mysql_connect("$mysqlhost", "$mysqluser", $mysqlpasswd) or die("Error
connecting to
Mysql");
mysql_select_db($mysqldb) or die ("Error selecting MySql Database");
$deleteresult = mysql_query ("DELETE FROM tablename WHERE id='$id'");
print "<b>Entrie Number ";
print "$id Removed";
print "</b>";
mysql_close();