[ad_1]
I’m using this code to insert the count of the table into a variable but it gives syntax error: 1064
SET @findTableRows = CONCAT('SELECT COUNT(id) INTO ',currentTableRows,' FROM ',aTableName);
PREPARE stmt2 FROM @findTableRows;
EXECUTE stmt2;
error is >>>>
"code": "ER_PARSE_ERROR",
"errno": 1064,
"sqlMessage": "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0 FROM z_wallet_txn_2021_02' at line 1",
"sqlState": "42000",
"index": 0,
"sql": "CALL wallet_txn_cron('2021-02-03 11:28:48.000')"
}
[ad_2]