This piece of code kept giving error messages that looked like some of my VALUES were getting parsed by php:
I don't know what the API looks like in php, but usually you want to use the "bindings" form which should look something like:
sqlite_query($handle, "INSERT INTO course VALUES (?,?,?,?,?)", array($semester, $course, $course_desc, $college, $reference))
That saves you any quoting hassles. You may also be able to use the named form:
# you may already have the data in this form ... values=array("semester" => $semester, "course" => $course, "course_desc" => $course_desc, "college" => $college, "reference" => $reference)
# the :fields are looked for in the array
sqlite_query($handle, "INSERT INTO course VALUES (:semester, :course, :course_desc, :college, :reference)",
$values)
It took me a long time to figure out that this worked:...
'$semester',
It won't work if there are single quotes within the values.
Roger