mysql_affected_rows(int resource_id);
This will return the number of rows that were affected by the last
operation, so you could do something like this:
if(mysql_affected_rows($connection) == 1){
//insert, update or delete succeeded
}else{
//operation failed
}
----- Original Message -----
From: "Chris Payne" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 07, 2002 7:34 PM
Subject: [PHP-DB] MySQL Result
> Hi there everyone,
>
> I have delete working perfectly by doing the following:
>
> include("connectionstart.php");
>
> mysql_query ("DELETE FROM emaillist WHERE EMail = '$email'
> ");
>
> However, how do I return a true or false flag whether the row was deleted
or
> not? I basically need to know how to do a 0 or 1 I guess once the row has
> been deleted or if the specified email address wasn't found.
>
> Thanks for your help everyone.
>
> Chris
>
>
> --
> PHP Database Mailing List (http://www.php /)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php