Arraying JOINED tables
| From: | César Aracena | Date: | Sun, 16 Jun 2002 07:06:16 +0000 |
| Subject: | Arraying JOINED tables | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-19828@lists.php.net to get a copy of this message | ||
Hi all.
This should be an easy one for all of you. I want to make a basic SELECT
query from two tables and fetch all the results into one array. Im
doing it like this:
$query = "SELECT * FROM logins,auth WHERE logins.authname = $variable1
AND auth.authid = $variable2";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
and I get: Warning: Supplied argument is not a valid MySQL result
resource in blah blah
What am I doing wrong? Thanks in advance,
Cesar Aracena <mailto:webmaster@icaam.com.ar>
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621