QUICK HELP, two selects, maybe nested.

2001-12-01 Thread Corey Kaye
Looking though the docs. MySQL does not support nested selects but i'm looking for a way to speed up my PHP. This is what i have: CREATE TABLE departmentuser ( userid int(10) unsigned zerofill default NULL, departmentid int(10) unsigned zerofill default NULL, KEY

Re: QUICK HELP, two selects, maybe nested.

2001-12-01 Thread Sinisa Milivojevic
Corey Kaye writes: Looking though the docs. MySQL does not support nested selects but i'm looking for a way to speed up my PHP. This is what i have: CREATE TABLE departmentuser ( userid int(10) unsigned zerofill default NULL, departmentid int(10) unsigned zerofill default NULL,

Re: QUICK HELP, two selects, maybe nested.

2001-12-01 Thread Corey Kaye
I looked that up and IN is an OR ... correct ? Would be like saying: Show me the records where departmentid = 142 OR departmentid = 368 I did however find this: select * from departmentuser r1, departmentuser r2 where r1.userid=r2.userid and r1.departmentid=368 and r2.departmentid=142;