note 77350 added to function.mysql-query
| From: | ollitech at gmail dot com | Date: | Sat, 25 Aug 2007 17:53:51 +0000 |
| Subject: | note 77350 added to function.mysql-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-129782@lists.php.net to get a copy of this message | ||
Running an invalid delete query may not return false.
Invalid because no such record exists.
Code;
[php]
// execute it
$result=mysql_query($sql_delete_byindex);
if(!$result||$result==FALSE){
echo("<h1>Error occured while removing listing #:
<i>".$rec_index."</i> </H1>");
}else if($result==TRUE){
echo("<h1>Listing #: <i>".$rec_index."</i>
Deleted!</H1>");
echo "<a href=\"index.php\">Go to Start Page</a>";
}
[/php]
Query;
[code]
$sql_delete_byindex = "DELETE FROM
$mysql_table WHERE index =
'".$rec_index."' AND key = '".$key."'";
[/code]
result will be TRUE
----
Server IP: 209.41.74.194
Probable Submitter: 71.233.80.180
----
Manual Page -- http://www.php.net/manual/en/function.mysql-query.php
Edit -- https://master.php.net/note/edit/77350
Del: integrated -- https://master.php.net/note/delete/77350/integrated
Del: useless -- https://master.php.net/note/delete/77350/useless
Del: bad code -- https://master.php.net/note/delete/77350/bad+code
Del: spam -- https://master.php.net/note/delete/77350/spam
Del: non-english -- https://master.php.net/note/delete/77350/non-english
Del: in docs -- https://master.php.net/note/delete/77350/in+docs
Del: other reasons-- https://master.php.net/note/delete/77350
Reject -- https://master.php.net/note/reject/77350
Search -- https://master.php.net/manage/user-notes.php