Hi all,
I have a variable that is containing a list of numbers that is separated by a comma... 1,3,20,35 I am trying to insert each of these as a separate insert in a database while using php. I have the code below, but so far it is only inserting the first id and thats it.. anyone have any ideas?
$compt1 = count($S_GTSEL);
$S_gt = "";
for($j = 0; $j < $compt1; $j++) {
if ($S_GTSEL[$j] == "ALL") {
$S_gt = "ALL";
break;
}
if ($j != $compt1-1) {
$S_gt .= $S_GTSEL[$j] . ",";
} else {
$S_gt .= $S_GTSEL[$j];
}
$tmpquery1 = "INSERT INTO ".$table["assignments"]."(mem_id) VALUES('$S_gt')";
connectSql("$tmpquery1");
}
Thanks for your help all!