SQL Syntax error
I have started getting an error from a SQL insert in a plugin I wrote:
$query = "INSERT INTO cms__accesslist SET
userNum = '".$user_num."',
tableName = 'all',
accessLevel = '1',
maxRecords = '',
randomSaveId = '123456789' ";
mysqli()->query($query) or die("MySQL Error:<br/>\n". htmlspecialchars(mysqli()->error) . "\n");
The error references the need to check for correct syntax around ''" and the randomSaveId value.
Can anyone se ewhat the culprit is? This is the same syntax I use in many other areas.
If you could pass on the actual solution it might be helpful to someone else,
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php