Reply to Re: Selecting 3 database tables at the same time ?? if that makes sense.

Your name:

Reply:


Posted by J.O. Aho on 10/01/75 11:52

Mr Smith wrote:
> I have not tried it yet, but.
>
> I need to open a table, look at every row of data. Then select a
> particular field every time, get its contents. Then do a search for
> that value in another table (in the same database), than return
> another value from the searched rows fields.
>
> From that returned value do the same again in another table (in the
> same database), and return another value.
>
> Then do a bit of calculations etc
>
> Then go back and look at the next row in the original table, and
> repeat again until the end.

Use JOIN in your query, see the mysql page who to use join (works the same way
in most sql) http://dev.mysql.com/doc/refman/5.0/en/join.html

Use a while-loop for fetching the data and calculate it, there is a somewhat
useful example in the php manual
http://www.php.net/manual/en/function.mysql-fetch-array.php


//Aho

[Back to original 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

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