[thelist] php/mysql help

Manish Sharma msharma at satyam.net.in
Wed Feb 20 00:17:00 CST 2002


Shanx,

> Just as a matter of application design though, don't you think this is too
> database intensive -- too many trips to the DB?
Yes, you are correct. The total trips to db made are "no. of distinct
entries + 1".
But it does work and gets Sarah the desired results.
However, I would like to know a "cleaner" solution.

I was foxed with the following line in your code (or am I just losing it!)

($tempDate == $resultSet[$i][0])

What do $tempDate and $resultSet[$i][0] hold?

Finally, to make the script a bit faster, I would not have the
count($resultSet) in the for loop as it will be executed at each loop; would
rather use a variable that holds count($resultSet) value

Regards,
Manish Sharma
http://www.simplygraphix.com - Extreme Design
http://www.fontmagic.com - Largest True Type fonts directory on the Internet
http://www.webdevelopersnotes.com - Tutorials, tips, tricks, web page design
and much more




More information about the thelist mailing list