Page 1 of 1

select of 2 tables

Posted: Fri Dec 15, 2006 9:28 am
by hmsg
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hi.
 
   I'm having problems on  showing results of a query opf mysql including 2 tables:

Code: Select all

<?php
        //the select syntax of the select is ok(i've tried directly on mysql shell and it work) so my problem is in the echo. My tables are buy_requisition and fornecedor.
        $dados = mysql_db_query("DB1",$sql_select);
        while($registo=mysql_fetch_array($dados)){
            echo $registo['buy_requisition.indice'];
            echo $registo['fornecedor.name'];
        }
?>
Is the syntax of the echo ok? What i'm doing wrong?

With the best regards.

HMSG


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Fri Dec 15, 2006 4:50 pm
by feyd
The general concept of what you are doing is fine, but without seeing the query you are using it's impossible to tell you if you are doing it correctly.