multiple records and tables query - help

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Not sure if I should post in php or sql,

$query = "SELECT page.*, url_pages.* FROM `page` LEFT JOIN `keywords`
MATCH(`keywords`.`keyword_txt`) AGAINST ('$keyword'IN BOOLEAN MODE)";

I got a keyword table, the fulltext finds the word in the keywords table
and relates the page_id field to identical fields in the page table and
the url table.

keyword table
page_id keyword
1        foo

page table
page_id  title     description
1        my urls    It' my webpage

url table
page_id   url

I want *one reord* rendering like this:

my urls    It' my webpage

ie. the user sees one record

BUT in my mysql/php attempts i get this rendering:
my urls    It' my webpage
my urls    It' my webpage

What's the strategy to combine into *one* record? I can split things up
into two separate querys? I need help. Thanks

Re: multiple records and tables query - help

Quoted text here. Click to load it

You can't do this with SQL.  You will have to process the results in code.
Scan through the query results, accumulating the URL field, while watching
for the primary key field to change.
- Tim Roberts,
  Providenza & Boekelheide, Inc.

Site Timeline