how should i get ONE row from mysql? ( fetch_array etc? )
Posted
by Haroldo
on Stack Overflow
See other posts from Stack Overflow
or by Haroldo
Published on 2010-05-01T10:39:21Z
Indexed on
2010/05/01
10:47 UTC
Read the original article
Hit count: 91
php
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_key_exists($r) as $k ){
$g[$k] = $r[$k];
}
}
return $g;
© Stack Overflow or respective owner