I have the following code...it's not working..it just inserts a bunch of blank entries into the database. What am I doing wrong?
$queryinsert = "INSERT INTO mytable (year, seq, group, dis_type, subset, event_name) VALUES ('$year', '$seq', '$group', '$distype', '$subset', '$event')";
for ($y = 1; $row = mysql_fetch_assoc($queryresult); ++$y)
{
$year = substr($row['numyear'], 0, 4);
$seq = substr($row['numyear'], 4, 8);
$group = $row['grouping'];
$distype = $row['Type'];
$subset = $row['subset'];
$event = $row['name'];
$insertresult = mysql_query($queryinsert, $linkID);
}
i know it gets the correct results because if i echo out the results, it's correct...so i'm guessing i need to a find a different way to insert the data in the db?