RE: [PHP] Checking to see if a DELETE was successful from MSSQL

2002-04-30 Thread Steve Bradwell
Try this, $query = DELETE FROM [users] WHERE [user] = '$user'; $result = mssql_query($query) or die(Unable to delete user); if ($result) //delete worked. else //delete failed. -Original Message- From: Joshua E Minnie [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30,

Re: [PHP] Checking to see if a DELETE was successful from MSSQL

2002-04-30 Thread Joshua E Minnie
I tried that already, it always returns true. The reason is because it will always return true since it is only deleting if the user exists. This means that the query will run and successfully complete. But if the user does not exist it still runs and completes successfully, but the user was

Re: [PHP] Checking to see if a DELETE was successful from MSSQL

2002-04-30 Thread Miguel Cruz
On Tue, 30 Apr 2002, Joshua E Minnie wrote: I tried that already, it always returns true. The reason is because it will always return true since it is only deleting if the user exists. This means that the query will run and successfully complete. But if the user does not exist it still

Re: [PHP] Checking to see if a DELETE was successful from MSSQL

2002-04-30 Thread Joshua E Minnie
That was exactly what I needed. Thanks, this group has been so helpful. .:. Josh .:. Miguel Cruz [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Tue, 30 Apr 2002, Joshua E Minnie wrote: I tried that already, it always returns true. The reason is because

RE: [PHP] Checking to see if a DELETE was successful from MSSQL

2002-04-30 Thread Steve Bradwell
I agree, try using a select after the delete. -Steve. -Original Message- From: Joshua E Minnie [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 1:40 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Checking to see if a DELETE was successful from MSSQL I tried that already, it