MySQL Database & Model Classes
View Single Post
05-15-2009, 08:27 PM
Join Date: Feb 2009
Location: New York
Originally Posted by
Depends on what you want to use the result for, just a check to see if the row was inserted for example bool is fine. However if you needed to check how many rows were updated, then use mysql_affected_rows.
Also if you want to update all rows with id's between 8 and 9, but the table only holds 4 records, thus only has id's 1-4, mysql_query will return true (i.e. mysql didnt explode), but mysql_num_rows will return 0.
In short, it depends on what you want to check for.
Good FYI, thanks...
View Public Profile
Send a private message to allworknoplay
Find More Posts by allworknoplay