Reply to displaying count

Your name:

Reply:


Posted by Bill on 01/04/07 13:17

Trying to count number of records in table and use result as a loop.

in mysql I use
SELECT count( lingo ) FROM `mainpage` WHERE lingo = 'en'
I get the correct result of 35

How do I use php to get same result and put result into a variable so
that i can loop 35 times.

I have tried
$sqlcount = "SELECT count( lingo ) FROM `mainpage` WHERE lingo = \'en\'";
$resultcount = mysql_query ($sqlcount);
echo $resultcount;
just to check that the number has been generated.
But nothing is displayed. Is this the correct way to do this.
Thanks in advance

Bill

[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

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