hello i have one problem i want in a php
after refersh load an other sign from a database ....
i use select .... from ... where active = 'yes' order by rand() limit 1
but i dont want in one refresh load the some sign but only different
any idea ?
load different sig n randomization but only diferent ids...
Moderator: General Moderators
Re: load different sig n randomization but only diferent ids...
Register the id of the previus sign in a session then add
Code: Select all
$where = 'WHERE `active` = "yes"'. empty($_SESSION['sign_id']) ? '' : ' AND `id` != '. (int) $_SESSION['sign_id'];
$query = Mysql_Query('SELECT * FROM `table` '. $where .' ORDER BY rand() LIMIT 1');