Arraying JOINED tables

From: Date: Sun, 16 Jun 2002 07:16:26 +0000
Subject: Arraying JOINED tables
Groups: php.db 
Request: Send a blank email to php-db+get-19827@lists.php.net to get a copy of this message
Hi all and sorry if this message is sent many times, but I’m having problems switching mailing lists from one email address to another. 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. I’m 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

« previous php.db (#19827) next »