After the user submits his or her information, it is saved in the database tutorial. Each time the program reads the current result, it must be judged. For example, the user can set how many seconds to participate in the auction, how many times to bid, and how many times in front of it can be set. I only participate in the auction after people bid. They are all humanized functions //Automatic bidding
function auto($second,$gid,$shutuid)
{
global $table_prefix;
//Get the number of bids for this product
$maxnumber=0;
$unumber=array();
$query=mysql tutorial_query("select id,uid from `".$table_prefix." buylog` where gid=".$gid);
while($rows=mysql_fetch_assoc($query))
{
$maxnumber++;
if(isset($unumber[$rows[' uid ']]))
{
$uumber[$rows['uid']]++;
}
else
]] = 0; .$table_prefix."autobuy` where gid=".$gid;
$query=mysql_query($sql);
$allow=array();
$shutuid=explode(',',$ shutuid);
while($rows=mysql_fetch_assoc($query))
{
$seconds=explode(',',$rows['second']);
$unumber[$ rows ['uid']]=isset($unumber[$rows['uid']])?$unumber[$rows['uid']]:0;
!in_array($rows['uid'],$shutuid) && $rows['maxnumber']<=$maxnumber && $rows['number']>$unumber[$rows['uid']]) / /Includes time, and is not in the blacklist, and matches the bidding number setting of this member
🎜> $allowuser=array ();
if($allow)
{
$query=mysql_query('select uid,username,money,ip from `'.$table_prefix.'user` where uid in ('.implode( ',',$allow).')');
while($rows=mysql_fetch_assoc($query))
{
$allowuser[]=$rows;
unset($allow,$sql,$number,$maxnumber,$shutuid,$query,$u);
return $allowuser;
}