I need someone to change code…first autobid it random
but i want asc by create date
assume a to z
function butler($form,$to) //ฟังชั่น Auto Bid
{
$r=rand($form,$to);
$bittype = “bidbutler”;
ReturnButler();
$res=mysql_query(“SELECT distinct(b.uid),b.id,b.min_price, t.pid,SUM(b.no_bids) AS no_bids
FROM product t INNER JOIN butler b ON b.pid = t.pid AND t.bider_id <> b.uid
WHERE max_price > bid_price AND min_price <= bid_price
AND TIME_TO_SEC( TIMEDIFF( end_time,NOW() ) ) <= $r and end_time > NOW() and no_bids > 0
group by b.min_price,b.uid,b.pid order by t.pid,rand()”);