I've tried a few different ways but none seem to work. Once these rows are selected, it randomly chooses 3 winners, and sets their new dates to the current date.
Current code:
Code: Select all
<?php
include_once('../inc/connect.php');
$date = date("Y-m-d");
$drawquery = mysql_query("SELECT id FROM users ORDER BY rand() LIMIT 1");
$row = mysql_fetch_assoc($drawquery);
$wondaily = $row['wondaily'];
$userid = $row['id'];
echo $userid;
?>