2007. 02. 20, kedd keltezéssel 01.33-kor Fergus Gibson ezt írta:
> How about this instead, Mike?
>
> // some code
>
> $fortune = mysql_query("SELECT text FROM fortunes ORDER BY RAND() LIMIT 1");
> $fortune = mysql_fetch_row($fortune);
> $fortune = sprintf(
> '"%s"-Omniversalism.com',
> $fortune[
How about this instead, Mike?
"%s"-Omniversalism.com',
$fortune[0]
);
// some more code
?>
MySQL is implemented in random code, so it can probably perform this
operation faster, and this code is much cleaner. You may want to move
away from mysql since it's essentially deprecated. I have switch
2 matches
Mail list logo