Ignore:
Timestamp:
Feb 11, 2014, 10:47:44 PM (10 years ago)
Author:
rvelices
Message:

arrayfromquery optimizations: move double if from inside loop to outside + use directly mysqli calls to avoid function call overhead for every row retrieved from db

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_tag.inc.php

    r26649 r27336  
    7171  GROUP BY tag_id
    7272;';
    73   $tag_counters = simple_hash_from_query($query, 'tag_id', 'counter');
     73  $tag_counters = query2array($query, 'tag_id', 'counter');
    7474
    7575  if ( empty($tag_counters) )
     
    234234  $query .= "\n".(empty($order_by) ? $conf['order_by'] : $order_by);
    235235
    236   return array_from_query($query, 'id');
     236  return query2array($query, null, 'id');
    237237}
    238238
     
    321321    OR ', $where_clauses);
    322322
    323   $result = pwg_query($query);
    324   $tags = array();
    325   while ($row = pwg_db_fetch_assoc($result))
    326   {
    327     $tags[] = $row;
    328   }
    329   return $tags;
     323  return query2array($query);
    330324}
    331325
Note: See TracChangeset for help on using the changeset viewer.