I need help with the method of inserting values into one column in different rows.
Right now I have a blasted array that gives me a value like this:
('12', '13', '14')
These numbers are the new identifiers that I want to insert into the database.
The code I used to crack the array is this:
$ combi = "('' .implode (" ',' ", $ box)." ') "; // Where $ box is the starting array
The query I'm planning on using is stuck here:
mysql_query (" INSERT INTO studentcoursedetails ( studentID) VALUES
One option is to repeat this, but I cannot, because the array will be circular; maybe 3 identifiers, maybe 20.
The loop does not seem to be correct. Any help would be appreciated.
source
share