• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

PHP na Globalevents

Status
Not open for further replies.

Aleh

Active Member
Joined
Jan 9, 2009
Messages
1,228
Reaction score
39
Location
Rzeszów
PHP:
				$con = $SQL->query("SELECT `data`, `offertime`, `minoffer`, `maxoffer`, `received` FROM `auction_houses` WHERE `house_id` = ".$aucthous['house_id']."")->fetch();  
				$koniec = $con['data']+($con['offertime']*3600);
				$data = date("d.m.Y, G:i:s", $koniec);	
							
				$auctname = $SQL->query('SELECT `p`.`name` FROM `players` p, `auction_houses_offer` auc WHERE `auc`.`house_id` = '.$aucthous['house_id'].' AND `p`.`account_id` = `auc`.`accid` ORDER BY `auc`.`offer` DESC;')->fetch();
				if($koniec < time())
					$SQL->query('UPDATE `auction_houses` SET `received`=1, `buynow`="'.$auctname['accid'].'" WHERE `house_id` = "'.$aucthous['house_id'].'" LIMIT 1;');
Dało by to zapisać w globalevents aby się samo sprawdzało np co 1 min ?
 
może po części będę w stanie ci pomóc

$SQL->query('...')

na

db.executeQuery("...")


$data = date("d.m.Y, G:i:s", $koniec);

to może działać oczywiście zawsze przed $ daj local, ale jeżeli nie będzie to trzeba coś pokombinować z os.date

print(os.date("%x", 906000490))
--> 09/16/1998

local godzina = tonumber(os.date("%H", os.time()))
local minuta = tonumber(os.date("%M", os.time()))



no więcej nie jestem w stanie pomóc, może znajdzie się ktoś kto przepisze ci cały ten skrypt na lua
 
Możesz sobie to w cronie odpalać co 1 min.
k, dziękuje.

@edit
jak się samemu zamykało tematy ? W opcjach tematu nie ma nic o close ;/
 
Last edited:
Status
Not open for further replies.
Back
Top