Re: [PHP-DB] SQL statement - PHP/mySQL - brain fart

2002-03-19 Thread Steve Fry
Gurhan: snip I was wondering if you'd wanna use temporary tables to accomplish it.. Actually, another person on this list came up with the following: SELECT s1.site_id FROM site_category AS s1 JOIN site_category AS s2 WHERE s1.category_id=10 AND s2.category_id=12

Re: [PHP-DB] SQL statement - PHP/mySQL - brain fart

2002-03-18 Thread Jason Wong
On Tuesday 19 March 2002 10:22, Summit wrote: For some reason I keep thinking that this should be simple - but I just can't seem to figure it out. Help??? Please??? [I've been working on it for two days now.] Overview: What I'm trying to do is query one table by passing it two different

RE: [PHP-DB] SQL statement - PHP/mySQL - brain fart

2002-03-18 Thread Gurhan Ozen
ok it is 1:37 am here and i have been up since 6:00 am (the day before) and have to be awake ths mornign again at 6:00 am so if I make any mistakes trying to answer your question, please take it easy:) I was wondering if you'd wanna use temporary tables to accomplish it.. You may wanna do:

Re: [PHP-DB] SQL statement - PHP/mySQL - brain fart

2002-03-18 Thread Frank Flynn
Well it's sorta' simple once you get your mind around this - you need two tables but you've only got one. And there's no OR, you need both to be true for a site_id ... The query would be easy if you actually had two tables so we'll search off of the same table twice giving it different names