I am using a logbook to track all user interaction.
When trying to save the search of an page to my MySQL database I get this error: You have an error in your SQL syntax;
is MySQL seeing this as extra columns now?
$sql_lgb = "INSERT INTO logboek
(
omschrijving,
zoek,
sort,
soort,
user_id
)
VALUES
(
'".$omschrijving."',
'".$zoek_opdr."',
'".$sort_name."',
'pagina bezocht',
'".$_SESSION['user_id']."'
)
";
// resultaat van query
if(!$res_lgb = mysqli_query($mysqli, $sql_lgb)) { include('includes/error_database.php'); die; }
This is the output of the query:
INSERT INTO logboek ( omschrijving, zoek, sort, soort, user_id ) VALUES ( 'Pagina Manuals bezocht', ' (bedrijf LIKE 'torza' OR bedrijf LIKE 'thure' OR bedrijf LIKE 'mb' ) AND (naam LIKE '%%') ', 'naam', 'pagina bezocht', '1' )