View Full Version : iterations vs query

06-09-2005, 08:09 AM

At which point would it then be more feasible (faster) to perform a db query query (on a varchar(255) column) rather than perform an iteration search via the following:

function getCategoryIdFromFullPath($fullPath)
foreach($this->data as $parent => $categories)

foreach($categories as $id => $cat)

if ($cat['full_path'] == $fullPath)

return $id;

return 0;

e.g how many category groups could exist, 300 or more ?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum