Re: how to read a specific "cell"

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

 



Sebastian, just a guess, but maybe when you do $table['de'] it is
assuming the first element in the array.  i.e.  $table['de'][0].
Perhaps if you tried $table['de'][2] it might work.  Just an idea.

Also, how does your code look to convert the result set to an array?
That might help to decipher what might be going wrong.  I'm wondering if
you're just off on your array elements.  Arrays in PHP typically start
with 0, so it should be $table[2][2].

Stuart


On Tue, 2005-04-26 at 23:05 +0200, Sebastien Pahud wrote:

> Hello,
> 
> I cannot figure out how to read a specific "cell" in a result i got from 
> a SQL request.
> 
> I have a SQL request on a database:
> SELECT nameAttribute, fr, de, en
> FROM traduction
> WHERE nameTable = 'whatever'
> AND idTable = 1
> ORDER BY nameAttribute
> 
> and i am suppose to get something like this :
> 
> ---------------------------------------------
> | msg       | bonjour  | gutentag | good morning |
> ---------------------------------------------
> | time       | diner      | essen      | lunch             |
> ---------------------------------------------
> | weather | beau      | schÃn     | nice                |
> ---------------------------------------------
> 
> I always know how many rows i am suppose to get.
> 
> Now, how can i get the word "schÃn" for example out from that table ? I 
> need to get it specifically, and not all the row.
> $table['de'] will return the 1st one. (Gutentag in my example) I need 
> the 3rd one... or the 2nd... and so on.
> 
> $table[2][2]; or anything like this doesn't seem to work.
> 
> mysql_fetch_assoc, mysql_fetch_row, mysql_fetch_array........ Well, what 
> and how should i use this....
> 
> Hope you got my broken english
> 
> Thanks
> 
> Seb
> 

Stuart G. Nielson
Inventra

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux