View Single Post
Old 02-17-2013, 04:13 AM   PM User | #4
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,185
Thanks: 59
Thanked 3,995 Times in 3,964 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Sorry! I saw your post before you added the UPDATE. But then it was still sitting on my browser screen and I didn't refresh before answering.

You clearly did read the manual, and I apologize.

You would know that SQL (any kind of SQL, be it MySQL, SQL Server, Oracle, or even Access) does not *EVER* consider it an error (or even a warning) when there are no rows affected by a DELETE or UPDATE (or SELECT! think about it!) if you had experience doing ad hoc queries directly to the database.

For example,
Code:
mysql> delete from users where userid = 777;
Query OK, 0 rows affected (0.00 sec)
That's from MySQL's command line client. As you can see, it tells me the query is "OK" but then tells me there are zero rows affected.

In a way, I think it's too bad that people don't learn the command line client nowadays. It really gives you the closest interaction with MySQL and the best feeling for how things work, in my opinion. But I do understand the attraction of tools such as phpMySqlAdmin (or whatever the right name is).
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.

Last edited by Old Pedant; 02-17-2013 at 04:16 AM..
Old Pedant is offline   Reply With Quote
Users who have thanked Old Pedant for this post:
durangod (02-17-2013)