[wp-hackers] DB Queries--which way to go?
Brad Fults
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?
--
Brad Fults
NeatBox
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...
>
> --
> Thanks,
> Elliott C. Bäck
>
> 607-229-0623
> http://elliottback.com
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list