I'm pretty sure i'm doing an extra loop here:
$q = "SELECT * FROM genres WHERE genre.g_url = '$genre_url' LIMIT 1";
$res = mysql_query($q);
while ($r = mysql_fetch_array($res, MYSQL_ASSOC)){
foreach( array_keys($r) as $k ){
$g[$k] = $r[$k];
}
}
return $g;