note 77350 deleted from function.mysql-query by philip

From: Date: Fri, 04 Sep 2015 19:23:22 +0000
Subject: note 77350 deleted from function.mysql-query by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-203660@lists.php.net to get a copy of this message
Note Submitter: ollitech at gmail dot com ---- 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

« previous php.notes (#203660) next »