0

I have this query in a php page:

 q('INSERT INTO books (book_id,user_id,location_id,class_id,course_id,email,isbn,title,author,price,condition,sharing,sold,reporting,date) VALUES ("'.$row['id_libro'].'","'.$row['id_utente'].'","'.$row['id_sede'].'","0","0","'.$row['email'].'","'.$row['isbn'].'","'.$row['titolo'].'","'.$row['autore'].'","'.$row['prezzo'].'","'.$row['stato'].'","'.$row['condivisione'].'","'.$row['venduto'].'","'.$row['segnalazione'].'","'.$row['data'].'")');

but when I run the code I get this error:ΓΉ

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'condition,sharing,sold,reporting,date) VALUES ("122","0","1","0","0","DOTS@hotma' at line 1

but I don't understant, I check all the apices and I didn't find the error. Someone can help me? Thanks

hteo
  • 315
  • 1
  • 4
  • 11

0 Answers0