MySQL combining
#4

Quote:
Originally Posted by Sithis
Посмотреть сообщение
Assuming you are using an auto incremented primary key on the House table, why not do

SELECT * FROM `Houses` ORDER BY `HouseID` DESC LIMIT 1

or assuming you are saving a timestamp on the inserted datetime of the house

SELECT * FROM `Houses` ORDER BY `InsertedDateTime` DESC LIMIT 1
Thank you!
is there a way to get the max unique id? So if I for example have 200 houses, and add one, then delete one it still would be 201, and next 202..?
Reply


Messages In This Thread
MySQL combining - by C5Perfect - 17.03.2018, 11:36
Re: MySQL combining - by MadeMan - 17.03.2018, 11:59
Re: MySQL combining - by Sithis - 17.03.2018, 12:58
Re: MySQL combining - by C5Perfect - 17.03.2018, 13:31

Forum Jump:


Users browsing this thread: 1 Guest(s)