Jump to content

Update lowest value row in table (MySQL)


andrewgarn

Recommended Posts

Right so my database needs to store 5 records for each user.

 

The update page should:

 

check in no. records < 5

if records less than 5 is there already a record for today, if so update it.

if no record for today insert record.

 

if no. records = 5 update the records where a field is lowest

 

ie UPDATE record where field1 is lowest out of 5 records. (IF the lowest value is smaller than a external)

 

 

 

 

How would I do the update of the lowest value row?

Link to comment
https://forums.phpfreaks.com/topic/114552-update-lowest-value-row-in-table-mysql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.