I am listing item from a database, in an array of many database items. I know what I am trying to do can be done by having separate table, however for this requirement, i wanted to see if it is possible to do the following.
My code is:
$sql_list ="SELECT *
FROM ".$this->tables_rma."
ORDER BY dateCreated DESC";
This returns an array of data in the table which is good, however I have multiple entries of the same item with different entities.
So what i want to be able to do is select one of each entry, by its most recently updated row of data.
Is this possible, or am i simply trying to cut corners?
Suppose you have ID unique field and YourITEM field then:
If you don’t need last DateCreated value in your select then just: