Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check if query successful

Status
Not open for further replies.

shangrilla

Programmer
Nov 21, 2001
360
US
Hi:

I want to show a message if my query was successful or not.

mysql_query("delete from table1 where name1 like '%' ");
 
If you check here you can see what mysql_query() returns. You can then test the return value to see if it was explicitly FALSE or not. The one gotcha can be avoided by use of the "===" operator. ( ______________________________________________________________________
Never forget that we are
made of the stuff of stars
 
Alternatilvely parse the mysql_affected_rows() result to see how many were completed. ______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top