function db_random_select($query) { $random_info = ''; $random_query = db_query($query); $num_rows = db_num_rows($random_query); if ($num_rows > 0) { $random_row = tep_rand(0, $num_rows - 1); db_data_seek($random_query, $random_row); $random_info = db_fetch_array($random_query); } return $random_info; }
function db_data_reset($res) { return db_data_seek($res, 0); }