Reply to Re: Loops

Your name:

Reply:


Posted by Ewoud Dronkert on 07/09/05 18:49

On Sat, 9 Jul 2005 16:42:17 +0100, Fire Juggler wrote:
> {while ($row = mysql_fetch_array($numresultsgal)) {

What's that first { doing there?

> $table=$row{'table_gal'};

Replace { and } with [ and ].

> $numresultphotos=mysql_query("SELECT * FROM" .$table. "order by date desc");

The table name gets plastered against 'FROM' and 'order', the query will
not be valid. Also, if you only need the number of rows, don't get the
complete result set, but use an aggregate function (COUNT) to let de
database do the counting for you.

> echo"<b>Gallery:</b> " .$row{'gallery'}. "<br>";

Replace { and } with [ and ].

--
Firefox Browser - Rediscover the web - http://getffox.com/
Thunderbird E-mail and Newsgroups - http://gettbird.com/

[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

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