You didn't try it, did you.... 8-). In a nutshell a basic SELECT statement looks like:
SELECT /columns list/ FROM /tables list/ WHERE /conditions list/ The /columns list/ is where you specify all of the values you want from the database, including constant and computed values The /tables list/ is where you specify where the data comes from. If it requires more than one table to provide your data, this is also where your table JOINs occur. The /where list/ defines the conditions each resulting row must meet in order to be able to contribute it's values to those requested in the /columns list/ Please refer to this URL for more details: http://dev.mysql.com/doc/mysql/en/SELECT.html Shawn Green Database Administrator Unimin Corporation - Spruce Pine "leegold" <[EMAIL PROTECTED]> wrote on 10/08/2004 01:12:17 PM: > > On Fri, 8 Oct 2004 12:22:37 -0400, [EMAIL PROTECTED] said: > > I think that this will work: > > > > $query = "SELECT page.*, url.* FROM `page` LEFT JOIN `keywords` USING > > (`page_id`) LEFT JOIN URL USING (`page_id`) WHERE MATCH > > (`keywords`.`keyword_txt`) AGAINST ('$keyword' > > IN BOOLEAN MODE)"; > > Sorry to bother I may be showing my lack, but the url table is a > different table from the page table so wouldn't it be folowing your > example: > > $query = "SELECT page.* FROM `page`, url.* FROM `url` LEFT JOIN > `keywords` USING....?? > > Thanks again > > > > > > > > > > > > Shawn Green > > Database Administrator > > Unimin Corporation - Spruce Pine > > > > > > "leegold" <[EMAIL PROTECTED]> wrote on 10/08/2004 12:06:17 PM: > > > > > A popular question, how to select/query from two tables. I googled it > > > but am having trouble, wondered if anyone would answer this newbie > > > question. Here's my existing (PHP) query: > > > > > > $query = "SELECT page.* FROM `page` LEFT JOIN `keywords` USING > > > (`page_id`) WHERE MATCH (`keywords`.`keyword_txt`) AGAINST ('$keyword' > > > IN BOOLEAN MODE)"; > > > > > > I want to SELECT from a new second table using "page_id" just like I'm > > > doing now...they all are related by that page_id field. So i'm already > > > selecting from a table called "page" and I want to select from a new > > > table called "url" the same i do for "page" at the same time. How do I > > > modifiy my statement? > > > > > > Thank you sincerely, > > > Lee G. > > > > > > -- > > > MySQL General Mailing List > > > For list archives: http://lists.mysql.com/mysql > > > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > >