[wp-trac] [WordPress Trac] #10864: Add replace method to wpdb
WordPress Trac
wp-trac at lists.automattic.com
Tue Dec 22 19:45:20 UTC 2009
#10864: Add replace method to wpdb
---------------------------+------------------------------------------------
Reporter: aaroncampbell | Owner: ryan
Type: enhancement | Status: new
Priority: normal | Milestone: 3.0
Component: Database | Version:
Severity: normal | Keywords: has-patch needs-testing
---------------------------+------------------------------------------------
Comment(by aaroncampbell):
Replying to [comment:5 Denis-de-Bernardy]:
> Suggesting wontfix, personally. If memory serves, REPLACE INTO will
change the ID of the original row.
REPLACE will alter an auto-increment primary key *if* you use a different
unique key to specify the row to replace. Most of the time you're using
the primary key though, in which case it stays.
Even so, I'm not suggesting that we start using it all over the place,
just that we add it to wpdb since I think it's something that's used
pretty commonly. It would just make wpdb more flexible with only 6
additional lines of code.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10864#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list