Posted by John Taylor-Johnston on 11/16/05 06:17
My question is simnple. I want to randomly select a row in a mysql
table. I have a primary id.
<?php
$server = "localhost";
$user = "foo";
$pass = "foo";
$db="foo_db";
$table="foo_table";
$myconnection = mysql_connect($server,$user,$pass);
mysql_select_db($db,$myconnection);
$sql = ??;
$news = mysql_query($sql) or die(print "<font
color=red>".mysql_error()."</font>");
while ($mydata = mysql_fetch_object($news))
{
??
}
?>
Navigation:
[Reply to this message]
|