I wrote a saved proc in sqlyog. It is quite long and performs all the required functions except for the concat expression, so I will list only this specific request.
UPDATE recipes_new
SET co_auths = CONCAT(co_auths,',',c1id)
WHERE id = name_in;
Basically I want separation in two fields, and this operator is placed in the cursor, so it is iterative. co_authsat the moment it is null, so I get the result as 1,2,3, where as I want it is 1,2,3. Any guesses on what might be the most appropriate solution?
source
share