There is a plan table Dir which needs to update the latest row per user on.
With the below mysql, however, Dir.Md is equal to a GET variable found as 'Mem' and needs to be joined to pull the latest row per user.
Dir.DirID is primary.
DCreateDate is obviously the date column.
DView the increment column.
How can it be done here (used to GET with php, not mysql)?
UPDATE update_last_row as T
inner
join ( select DirID
, max(DCreateDate) maxdate
from update_last_row
group by DirID ) as M
on M.DirID = T.DirID
and M.maxdate = T.DCreateDate
SET T.DView = (T.DView + 1) WHERE // Dir.Md = ?