Iterating Through Array Javascript Concat Function In Mysql