REPLACE SYNTAX

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

REPLACE SYNTAX

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Did you try it?
Post Reply