After my connection to database, I surely insert elements to my table one by one, but I do not have any idea about inserting elements from an array, vector..etc to tables. Following query is that I tried, but no effects on table.
mysql_query(connection,"insert into mytable (id) values(arr[0])");