Re: problem with getting info from 2 tables in PHP / MySQL
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: problem with getting info from 2 tables in PHP / MySQL

From: Shelly <sheldonlg.news@asap-consult.com>
Date: Wed Aug 03 2005 - 12:39:46 CEST

"utque" <utqsall@gmail.com> wrote in message
news:1123054221.632845.204180@g14g2000cwa.googlegroups.com...
> while you are accessing the sql database, try using the INNER JOIN
> command.
> $sql = mysql_query("SELECT * FROM logintableb INNER JOIN datatable
> WHERE
> logintable.school = datatable.school");
>
> I am not sure of it but trying doesn't hurt.
>

You post appeared **six** times. There seems to be a problem with your
newsreader.

This works:

$sql = mysql_query("SELECT * FROM logintableb, datatable WHERE
logintable.school = datatable.school");

there is no need to explicitly state "INNER JOIN".

Shelly
Received on Mon Oct 24 02:09:14 2005