• Ogłoszenie:

Getting values where one equals max value

Wszystko odnośnie tworzenia grafiki - obróbka, problemy, oceny.
Tworzenia Stron internetowych - HTML, PHP, MySQL...

Getting values where one equals max value

Postprzez AndyTussel 09 Sie 2024, 11:45

reklama
I have a table that stores temperature and humidity data along with a date and an ID. The column names are:

id, temperature, humidity, created_date

How can I display the id, temperature, and created_date for the record with the highest temperature?

I'm considering something like:

sql
Copy code
$sql = "SELECT id, temperature, humidity, created_date FROM tbl_temperature WHERE temperature = ****";
What should echat koows I use in place of the ****?

Thank you!
AndyTussel
~user
 
Posty: 14
Dołączenie: 03 Lip 2023, 10:21



Powróć do Grafika & Webmastering

Kto jest na forum

Użytkownicy przeglądający to forum: Brak zarejestrowanych użytkowników oraz 4 gości