When I run this query in PHPMyAdmin it works fine:
$sql = "INSERT INTO Taskers (Taskers.MemberID, Taskers.EventID) VALUES ($memberid, $eventid)";
...but when I run it from the PHP page using the
$sql command, I get the error:
You have an error in your SQL syntax.....near ')' at line 2
The Taskers table uses foreign keys to relate to the primary keys in the Members and Events tables. The Taskers table also has the primary key
TaskerID. which auto-increments.
I double checked: both
$eventid are set to integers.
I looked at the general log and, strangely, the query is not showing up. Running a quick test, it seems that only
SELECT queries are showing up in the general log, but no
INSERT commands are showing up.