No.  You only get one FROM clause, so it's "SELECT columns FROM tables...".

See the manual for complete details of SELECT syntax <http://dev.mysql.com/doc/mysql/en/SELECT.html>.

Michael

leegold wrote:

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]




-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to