0

I need to get the IDs of last update.

I have tried this.How to get ID of the last updated row in MySQL?

My code is

SET @uids := NULL;
UPDATE core_parcel 
    SET core_parcel.promotion_sms = '0'
WHERE core_parcel.senderid = '23'  AND core_parcel.promotion_sms = '1'
    AND ( SELECT @uids := CONCAT_WS(', ', @uids, core_parcel.REFID) )
LIMIT 10;
SELECT @uids;

But gives all id not just 10 ids. And it does not update at all.

AND ( SELECT @uids := CONCAT_WS(', ', @uids, core_parcel.REFID) )

Leaving out it updates.

Community
  • 1
  • 1
Mazhar
  • 169
  • 1
  • 8
  • 24

0 Answers0