A couple of questions of efficiency, please:

1. If I am creating a web page with numerous PHP calls to an MySQL database
is it more efficient to have lots of small blocks of php in an html page or
is it better to have just one or two big blocks of PHP with the html code
being delivered via echo statements?

2. If I want to know how many rows there are in a MySQL table, I can either
use the count function in MySQL (although I am having trouble figuring out
how to capture that value in a variable) or I can do a general "select *
from" from command in MySQL and then use the mysql_num_rows function in PHP
to get a row count (which is dead easy). It SEEMS to me the former would be
more efficient. Am I correct? 

Many thanks! 

Jeffrey Baumgartner

eBusiness Consultant - ITP Europe
+32 2 721 51 00

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to