You are here: Re: boy was i wrong « PHP Language « IT news, forums, messages
Re: boy was i wrong

Posted by Michael Fesser on 07/22/07 15:35

..oO(Norman Peelman)

> Is the field 'approved' a TEXT field or a numeric field (INT for
>example)?
>
>If its a numeric field then:
>
>SELECT * FROM $db_table8 WHERE approved = 0

Better:

SELECT COUNT(*) FROM $db_table8 WHERE approved = 0

If you just want to get the number of records, it's not necessary to
transfer all data from the DB to the script, just to throw it away after
calling mysql_num_rows().

Micha

 

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

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