php - How to insert row to first place in db -
i have question, want insert new row db (mysql) using php , need add together first place in table, comes lastly position.
i need short this:
3
2
1
but shorts like
1
2
3
can help me please?
thanks lot, stepan
assuming using incremental id unique key, can do:
order id desc
if not, can add together column db called "created" datetime set now() when create row. do:
order created desc
php mysql
No comments:
Post a Comment