Date: 06/16/02
- Next message: César Aracena: "[PHP-DB] Extracting Time??"
- Previous message: César Aracena: "[PHP-DB] Arraying JOINED tables"
- In reply to: César Aracena: "[PHP-DB] Arraying JOINED tables"
- Next in thread: César Aracena: "RE: [PHP-DB] Arraying JOINED tables <--- SOLVED"
- Reply: César Aracena: "RE: [PHP-DB] Arraying JOINED tables <--- SOLVED"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Try find out if you have an error in your query, like this:
$query = "SELECT * FROM logins,auth WHERE logins.authname = $variable1
AND auth.authid = $variable2";
if ( $result = <email protected>($query) ) {
$row = mysql_fetch_array($result);
}
else {
echo mysql_error();
}
and the other thing... maybe you have fields in both table logins and auth
with the same name
Denis Arh
----- Original Message -----
From: "César Aracena" <caracena <email protected>>
To: "PHP DB List" <php-db <email protected>>
Sent: Sunday, June 16, 2002 8:59 AM
Subject: [PHP-DB] Arraying JOINED tables
Hi all. Hope you're all alright since I don't see any of you writing for
some time now ;-)
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 <email protected>>
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: César Aracena: "[PHP-DB] Extracting Time??"
- Previous message: César Aracena: "[PHP-DB] Arraying JOINED tables"
- In reply to: César Aracena: "[PHP-DB] Arraying JOINED tables"
- Next in thread: César Aracena: "RE: [PHP-DB] Arraying JOINED tables <--- SOLVED"
- Reply: César Aracena: "RE: [PHP-DB] Arraying JOINED tables <--- SOLVED"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

