Community Add-Ons

Maintainers: FWR Media
Add file to this package
Top » Other

parent_id Query Optimisation
for osCommerce Online Merchant v2.2

catalog>index.php calls tep_get_path() in catalog>includes>functions>general.php for each link so there are multiple queries. Especially if you have a parent category with multiple children.

The queries look like ..

Select parent_id from categories where parent_id = X

You could potentially have 100s of these.

This contribution reduces it to one query regardless of the number of child categories you may have.

Legend:  Download   Report

Expand All / Collapse All

*** Correction *** FWR Media 25 Mar 2007  

Sorry I had duplicated some code in the tep function.

parent_id Query Optimisation FWR Media 23 Mar 2007