I have wrote a stored proc in sqlyog
. It is quite long and performing all the desired functionality except for the concat statement so I will only list that particular query.
UPDATE recipes_new
SET co_auths = CONCAT(co_auths,',',c1id)
WHERE id = name_in;
I basically want a separation in the two fields and this statement is placed in a cursor so it is iterative. co_auths
is null at the moment so I get the result as ,1,2,3 where as I want it to be 1,2,3. Any guesses what can the most appropriate solution be?