If there are 3 records with different amount as 500, 1000 and 1500 respectively, so for default query will be like amount order by DESC, 2nd condition is there is a button like "MOVE TO TOP",if 500 amount user click on button then that record move to top and next records should be display amount wise like 1500, 1000.
If click on "move to top" button then current date will stored in click_date column.
I am using just default amount DESC query,
SELECT property_id
FROM userpostproperties
WHERE status = '1'
ORDER BY amount DESC
Please suggest for further condition give me sample query
You could create an amount_order
field as suggested in the comment section and order
by that. However, this might be an unfeasible option in case you do not want to store that information for some reason (memory saving, avoiding very frequent writes, etc.), then you could create a stored function which will do this calculation. However, if you do not know the ordering in advance, for instance because you need to order based on user actions, then you will need to write a PDO query and pass the ordering criteria as a parameter to that.