Select ROW_COUNT() INTO a variable

2010-07-19 Thread Bryan Cantwell
I have a stored procedure in mysql 5.1.48 that deletes old data from my tables. I would like to keep a running count while it does this. Here is what I try now: ... DECLARE dropCnt INT DEFAULT 0; ... SET @sql = CONCAT('DELETE FROM myTable WHERE itemid = ', iID, ' AND clock BETWEEN 0 AND ',

Re: Select ROW_COUNT() INTO a variable

2010-07-19 Thread Shawn Green (MySQL)
On 7/19/2010 5:22 PM, Bryan Cantwell wrote: I have a stored procedure in mysql 5.1.48 that deletes old data from my tables. I would like to keep a running count while it does this. Here is what I try now: ... DECLARE dropCnt INT DEFAULT 0; ... SET @sql = CONCAT('DELETE FROM myTable WHERE itemid