[wp-hackers] DB Queries--which way to go?
bfults at gmail.com
Sun Jul 10 18:40:47 GMT 2005
I would go with option (1). Out of curiosity, what were your concerns
with that method?
On 7/10/05, Elliott Bäck <ecb29 at cornell.edu> wrote:
> I've currently got two options for db access with a plugin I'm writing,
> and would like an opinion on which one is better:
> 1) get the applicable row, update if exists, insert if not
> 2) insert blindly, schedule a "cleanup" thread to consolidate duplicates
> Another option is something like oracle's MERGE function, where I can
> check a condition and then base my query off subqueries if it exists to
> update the row or else insert, but I don't think MYSQL can do that...
> Elliott C. Bäck
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers