You are here: Re: [PHP] how to read a specific "cell" « PHP « IT news, forums, messages
Re: [PHP] how to read a specific "cell"

Posted by Richard Lynch on 10/20/36 11:14

On Tue, April 26, 2005 2:05 pm, Sebastien Pahud said:
\> I cannot figure out how to read a specific "cell" in a result i got from
> a SQL request.

http://php.net/mysql_result

You don't want to use that a hundred times instead of mysql_fetch_row, but
it's fine for what you want.

If you are only getting the 3rd row, however, you may want to use LIMIT
instead to save downloading two rows you don't need.

>
> 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
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Like Music?
http://l-i-e.com/artists.htm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация