Hoping one of you guys can point me in the right direction. I've got the following code and all it will do is spitout erro 1065 query was empty:
$datenow = date("m/j/y H:i");
$sqlCompleted = "INSERT INTO completed (id, offerid, offername, pays, mid, date, paid, refpaid, payoutgroup)"
. " VALUES ('', '" . $offers[$csv[$oid][1]][0] . "', '" . $offers[$csv[$oid][1]][1] . "', '" . $offers[$csv[$oid][1]][2] . "', '$oid', '$datenow', '0', '0', NULL);";
if(!($resultComplete = @mysql_query($sqlComplete, $conn))){
echo "$sqlCompleted<br>";
echo mysql_error($conn);
exit();
} else {
do some other stuff....
}
All it will do at this point is say:
INSERT INTO completed (id, offerid, offername, pays, mid, date, paid, refpaid, payoutgroup) VALUES ('', '6', 'offer name', '12', '5', '08/1/05 15:23', '0', '0', NULL);
Query was empty
I can't figure out what the problem is, I've got literally the same exact sql statement in another part of the script and it works flawlessly. And I do mean exactly. I copied the code from that function to this function and then changed the values that were being inserted.
I can take the insert statement that it spits out, open phpmyadmin and paste it there and it inserts the record fine. Any Ideas on what the problem is?