Re: Retreive data from multiple columns by ['tablename.colname']

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Erik,

I think you can use   ** $line['cases.id'] ** if you individually identify each column 
selected, rather than using the * symbol.

David






Erik Björling <erik.bjorling@genpat.uu.se>

10/16/2003 10:57 AM



 

To:
php-db@lists.php.net
cc:





Subject:
 Retreive data from multiple columns by ['tablename.colname']



> Hi,
>
> I use a query with multiple tables:
> SELECT * FROM cases,status,prio  where cases.statusid=status.id && .....
>
> I retreive the data into my variable $line like this.
> while ($line = mysql_fetch_array($result)) {.....
>
> How can I retreive data from $line without using the index value as 
> integers for example $line[13]
> I would like to write $line['cases.id'] to retreive 'id' data from the 
> table 'cases' in a SQL-manner. But I get an error message regarding 
unknown 
> index 'cases.id'.
>
> Is there an easy solution to this? Is there another sign then '.' or 
should 
> I use other names for my 'id'-columns such as c_id, s_id.... etc.?
> 
> Regards
>
> Erik Björling

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




[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux