ok short and sweet. The following code will not delete the entry from the database and nor Dane or myself can figure it out. Help me please
code:<?
$pid = ($post);
$link=mysql_connect ("localhost", "izayne_admin", "matty") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("izayne_news");
$query = "SELECT * FROM IzzNews";
$result = mysql_query($query, $link);
$num = mysql_numrows($result);
$query = "DELETE FROM IzzNews WHERE NewsNum=".$pid;
?>
This post was edited on 08-22-2004 at 06:34 AM by matty.
O.P. RE: Delete entry from MySQL Database - Failing
quote:Originally posted by Mippo
Add another
code:$result = mysql_query($query, $link);
in the end and then it should work.
--> insert MSN Messenger conversation here <--
Thanks very much I really appreciate it, now I dont have to wreck my brain anymore trying to figure this out.
Posts: 7106 Reputation: 107
– / /
Joined: Mar 2002
RE: Delete entry from MySQL Database - Failing
quote:Originally posted by bach_m
the $link in't actually necesary, unless you have more than one connection open
If we're gonna be picky, then you don't need the "$result = " on the second query either, since a DELETE query will only return true or false, and you probably don't care about checking that.