Page 1 of 1

REPLACE SYNTAX

Posted: Fri Jul 20, 2007 4:46 pm
by kendall
i was reading up on the "REPLACE SYNTAX" for MYSQL however there was a part stating
The affected-rows count makes it easy to determine whether REPLACE only added a row or whether it also replaced any rows: Check whether the count is 1 (added) or greater (replaced).
is it saying that if you did a "print mysql_affected_rows()" the output will be 1 if it inserted while ($total_inserts - greater) if it was replaced?

Posted: Fri Jul 20, 2007 5:12 pm
by feyd
Did you try it?