ok, you're going to need to add a column to your table and designate it as a timestamp. when you create a new column in phpmyadmin it will give you the option of designating it as a timestamp and the mysql server will generate the current timestamp for you when a new row is inserted-just like the auto increment method you use for your primary key. you can also manually generate it in php using time() (or mktime() if not using the current date). once that is set up correctly, just sort your results by the timestamp field.
last inserted row number.
Collapse
X
-
too complicated for me!
this code i posted is giving me this result
6.00 is pos: 1.
5.00 is pos: 2.
4.05 is pos: 3.
4.04 is pos: 4.
4.03 is pos: 5.
4.02 is pos: 6.
4.05 is the last bid inserted ,the id of this bid is the highest bid !
what im try to solve is to display to the user this:
your bid price of 4.05 is at position 3.
i dont want to display all the results from all the users! only the last inserted!!
thanxComment
-
there is reg_id to the bid also!
there is ,reg_id ,username ,bid_price , bid_date ,an email .
i want the code to do like that:
select from the table for all the result.
start COUNT from the top ORDER by BID_PRICE DESC.
find the SESSION_USERNAM E and look if the highest ID of the last bid_price entered by him
if the Highest ID == session_usernam e stop count!
echo $count $username!
thats it!!Comment
Comment