You are here: Re: looping in php « PHP Programming Language « IT news, forums, messages
Re: looping in php

Posted by william.clarke@gmail.com on 11/19/27 11:45

As milahu and Rik said this is PHP looping through a result
set...(maybe not in the VB sense). There isn't a direct equivalent to
the VB6 recordset, but you don't need one.

//executes the query
$res = mysql_query('select * from foo') or die(mysql_error());

//loops until the end of the result set.
while ($row = mysql_fetch_assoc($res))

//Your tempvar thingy could go in here...
$tempvar = $tempvar . " / " . $row['colname']

//releases the result set reference.
mysql_free_result($res);

 

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

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