RE: [PHP] Deleting from a SQL db

From: Date: Mon, 29 Apr 2002 19:13:31 +0000
Subject: RE: [PHP] Deleting from a SQL db
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-95226@lists.php.net to get a copy of this message
Replace the die("...") with die(mysql_error()) and the message should tell you what's wrong. Stuart -----Original Message----- From: Joshua E Minnie [mailto:josh@acsurf.net] Sent: 29 April 2002 20:11 To: php-general@lists.php.net Subject: [PHP] Deleting from a SQL db Can anyone help me understand why this code is not deleting the row from the MS SQL db like it should. <? ... $query = "DELETE FROM users WHERE user = '$user'"; $result = @ mssql_query($query) or die("Unable to delete user"); if($result >= 0) echo "User successfully deleted.<br>\n"; ... ?> I am running PHP 4.1.2 binary on Windows NT 4.0 with MS SQL Server 2000 running on Windows 2000. -- Joshua E Minnie/CIO josh@acsurf.net Phone: 616.276.9690 Fax: 616.342.8750 Nextel: 616.862.2847 "Don't work for recognition, but always do work worthy of recognition." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#95226) next »