Adding char to string

You will have to convert the id to text. The number 0 is the same as the terminating null character. If your id is limited to 0..9, it's easy (look at the ascii table); else look at the itoa function.