Can't Update Please I need help


It is strange. Maybe again it’s to get to the latest comments without having to extract all transactions and display the last one. Seems wasteful given the speed with which a modern db server would do that, and plenty of scope for them going out of sync.

No, I read the second table as just being a “snapshot” of the current status of the delivery (or whatever it is we’re looking at). So there would only ever be one of those, hence the update, or insert when the job is first created. Maybe the OP will confirm or deny this is how they relate.


I found a way to update the comments through phpMyAdmin under tbl_courier, let me manage this way for the now


I know this is in the PHP category but I wonder if this is more of a Database thing.

Specifically, instead of an INSERT followed by an UPDATE, wouldn’t using a TRIGGER be an improvement?

But maybe I’m not seeing something and what is needed is a transaction?


I’m only guessing that’s what the separate table is for, I was hoping the OP would confirm. In any case, without the table layout it’s difficult to offer any more suggestions. I can’t see that having to go in to edit the row via phpmyadmin is much of a solution to anything, myself.


Why use “INSERT” when you are trying to update?


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.