Jump to content

[SOLVED] High Counter


Danny620

Recommended Posts

Hi Just wanted to know if php had a function that chosen the larges number

 

say i have a set of records like bids and i want php to be able to work out whos got the highest bid for example

 

i am user 1 and i place a bid of 1000 that gets stored into the db like so

 

id | 1 | bid | 1000

 

now say user 2 comes along and sees that user 1 has bidded 1000 so user 2 now would have to place a bit of a minium of 1500 to bet him so say he places a bet of 2000 that then gets stored into the db

 

like

id | 2 | bid | 2000

 

now i want a function that gets both results and the works out which number is largiest and then it stores that in a var

 

so i am thinking along these lines

 

the function gets highest bid put it in $highbid + 500 then i could use a if($bid >= $highbid){ then update db with higher bid; }

 

so can anyone help me out here thanks

Link to comment
https://forums.phpfreaks.com/topic/180183-solved-high-counter/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.