Check weather database query succeeded

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
SmokyBarnable
Forum Contributor
Posts: 105
Joined: Wed Nov 01, 2006 5:44 pm

Check weather database query succeeded

Post by SmokyBarnable »

Is there an easy way to check to see weather an INSERT INTO mysql command is successful or not?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Yes. Exactly how depends on the function/method you're using to send the query.
e.g. http://de2.php.net/mysql_query[quote]For other type of SQL statements, UPDATE, DELETE, DROP, etc, mysql_query() returns TRUE on success or FALSE on error.[/quote]
Post Reply