Posted by burgermeister01 on 08/13/07 18:44
On Aug 13, 12:53 pm, Big Moxy <bigm...@gmail.com> wrote:
> Can someone please advise me on how to implement this?
>
> The data entered by a user on form 1 on page1.php is posted to
> delete.php to remove that row from a table. After the SQL operation
> the user is returned to page1.php.
>
> How can I determine the success or failure of the SQL operation so I
> can display an appropriate response message to the user?
>
> Thank you!
Another option is this:
mysql_query() will return false if an error occurs, so if you put your
execute statement in an if statement as following you can get a
boolean success/failure response:
if(mysql_query()){
return "Yay! Success";
}else{
return "Failure";
}
Additionally, mysql_error() can tell you what went wrong.
[Back to original message]
|