I am trying to select from the db an id where X is divisble by Y.
Here is the code that I have, and isn’t working at all:
[php]$rres = @mysql_query(“SELECT id,theodds FROM odds
WHERE (’$totalclaimed’%theodds==0) ORDER BY RAND() LIMIT 1”);
$rrow=@mysql_fetch_array($rres);
$position=$rrow[“id”];[/php]
$totalclaimed is already defined and is defined correctly, I verified that it works.
id & theodds are column names in the table ‘odds’
I am sure it is something simple, but I have sat on this for a while now without a solution, and help would be greatly appreciated.
Thanks!