View Single Post
Old 07-20-2009, 02:22 AM   #6 (permalink)
codefreek
Super Moderator
Inquisitive 
 
codefreek's Avatar
 
Join Date: Sep 2007
Location: Near you.
Posts: 791
Thanks: 241
codefreek is on a distinguished road
Default

something like this maybe :)
A:
PHP Code:
$q mysql_query("SELECT LENGTH(firstname) AS thelength FROM myfriends ORDER BY thelength DESC LIMIT 1");
$longestname mysql_result($q,0,0);
echo 
"The longest first name is $longestname letters long!"
Q: How To generate a random number between 0 and 100 ?


srand((double)microtime()*1000000);
echo rand(0,100);
codefreek is offline  
Reply With Quote