<?php
ob_start();
include("conn.php"); //connection file
$sql = "select* from tablename order by rand()"; (rand is function of php not a field)
$query = mysql_query($sql);
$data = mysql_fetch_array($query);
?>
<?php echo $data['m'];?> ( m is field name )
thanks