[geeklog-devel] [Fwd: Re: Geeklog optimalisations]

Dirk Haun dirk at haun-online.de
Sun Mar 21 16:30:39 EST 2004


Niels Leenheer wrote:

>> Next is the database layer. The mysql_fetch_array() function has two
>> arguments. The second determines what the function returns. Either an
>> associative array, a numbered array or both. By default the function
returns
>> both. This is what Geeklog does. In most of the code only the associative
>> array is used. Only in a couple of small instances the code requires an
>> numbered array. What we have done is to instruct the mysql_fetch_array()
>> function to return only an associative array by default. Only when the code
>> requires a numbered array we request both. This should lower the amount of
>> memory needed by Geeklog.

This is now implemented in CVS. Per default, DB_fetchArray will only
return the associative array indices. If you need the numeric ones as
well, you'll have to pass a new (optional) second parameter:
DB_fetchArray ($result, true);

Thanks to Niels for helping me find all the places where the second
parameter is needed.

I've also fixed the first batch of bugs that have come up (from docs/
history - Tony, any news on CVS notifications?)

- Removed extra quotes in SQL statements in admin/block.php to ensure
  compatibility with old MySQL versions.
- Fixed SQL error in COM_showTopics when users tried to exclude topics in
their
  preferences.
- In admin/database.php, if the is_executable function is not available (e.g.
  on Windows), do at least a file_exists to check if the mysqldump executable
  exists in the path given in config.php.

bye, Dirk


-- 
http://www.haun-online.de/
http://geeklog.info/




More information about the geeklog-devel mailing list