Thanks a lot. It was an error... a HUGE one though :-)

César Aracena
IS / MCSE+I
Neuquén, NQN
(0299) 156-356688
(0299) 446-6621

> -----Mensaje original-----
> De: Denis Arh [mailto:[EMAIL PROTECTED]]
> Enviado el: Domingo, 16 de Junio de 2002 04:28 a.m.
> Para: [EMAIL PROTECTED]
> Asunto: Re: [PHP-DB] Arraying JOINED tables
> 
> 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 = @mysql_query($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" <[EMAIL PROTECTED]>
> To: "PHP DB List" <[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:[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


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to