|Athfar||ah that's what was screwing me up|
I put the limit before it
|drue||CareBear\: so.. any hints?|
|CareBear\||drue : Working. Subqueries galore.|
|drue||hrmm.. that's waht i was afraid of|
|CareBear\||drue : Actually no, I'm not sure.|
drue : Oh yeah join derived tables, hold on.
|drue||that is not something i've tried :)|
that a mysql 5 thing?
|sensei||Is there an easy way to check if there's two rows which has two fields identical, and if so remove one of them ?|
|CareBear\||sensei : Fields can't be removed.|
|sensei||Like id1, id2, txt1, txt2.. If there are two rows where id1 and id2 are the same, remove one of the rows|
CareBear\: Sorry, row
|CareBear\||drue : Hmm, I'm not sure. 4 may do subqueries.|
sensei : Oh, yes, that's simple: delete from table where id1=id2;
|JunK-Y||how can i do a like with a spefic table.field something like %table.field%?|
|drue||CareBear\: subqueries and derived tables (but not views) are supported in 4.1.|
|CareBear\||sensei : But wait, then all rows will be removed.|
|sensei||CareBear\: No, where id1=id1 and id2=id2, but only ONE of them|
|CareBear\||sensei : limit 2,max_rows_in_table perhaps?|
drue : Ok then.
|sensei||Hm, sounds dodgy, I was just trying to save some time, I'll pass it on to the developers tomorrow ;)|
Better not poke around in this
|Fighter||I LIKE SWORDS I LIKE SWORDS I LIKE SWORDS|
I LIKE SWORDS I LIKE SWORDS I LIKE SWORDS
|CareBear\||drue : select u.name,u.uid,n.num,c.num from users u join (select uid,count(*) as num from (select u.name,u.uid from users u join users_roles r on u.uid=r.uid where r.rid in (3,4,5)) u join node_revisions n on u.uid=r.uid group by uid) n on u.uid=n.uid join (select uid,count(*) as num from (select u.name,u.uid from users u join users_roles r on u.uid=r.uid where r.rid in (3,4,5)) u join node_revisions n on u.uid=r.uid group by uid) c on u.u|
|drue||CareBear\: *bow*.. will have a look|
|seekwill||Ping me if Fighter returns|
|CareBear\||drue : It's messy though. I would recommend just grabbing two rows instead. You could put them into the same statement by union too.|
seekwill : Okay. You good with InnoDB locks? :)
|seekwill||What's InnoDB? :)|
What about them?
|CareBear\||Well, InnoDB is this finnish thing I've heard about..|