RE: [PHP-DB] How to join 4 Tables?
| From: | Matt Williams | Date: | Wed, 07 Nov 2001 17:02:15 +0000 |
| Subject: | RE: [PHP-DB] How to join 4 Tables? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-14111@lists.php.net to get a copy of this message | ||
Look at JOIN and UNION syntax from the mysql manual
M:
> I would like to get the content of 4 tables into 1.
>
> How do I do that? I tryed
>
> $stmt =" SELECT t1.*, t2.*
> FROM temp_1 t1, temp_2 t2
> ";
>
> But it gives a result of nothing as soon as 1 table is empty. The goal of
> this is to create a rating of search results. Is one criteria ok. I would
> like to rate it with 25 % if all 4 are fitting I would like to rate with
> 100%.
>
> So I was building 4 temp tables and now I would like to join them in order
> to find out how often and who is in the result.
>
> Does anybody know how?
>