Ignore:
Timestamp:
Feb 28, 2007, 4:07:12 AM (17 years ago)
Author:
rvelices
Message:

feature 657: permalinks for categories

File:
1 edited

Legend:

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

    r1864 r1866  
    11761176
    11771177/**
     1178 * creates an hashed based on a query, this function is a very common
     1179 * pattern used here. The key is given as parameter, the value is an associative
     1180 * array.
     1181 *
     1182 * @param string $query
     1183 * @param string $keyname
     1184 * @return array
     1185 */
     1186function hash_from_query($query, $keyname)
     1187{
     1188  $array = array();
     1189  $result = pwg_query($query);
     1190  while ($row = mysql_fetch_assoc($result))
     1191  {
     1192    $array[ $row[$keyname] ] = $row;
     1193  }
     1194  return $array;
     1195}
     1196
     1197/**
    11781198 * Return basename of the current script
    11791199 * Lower case convertion is applied on return value
Note: See TracChangeset for help on using the changeset viewer.