I made a query like this:
INSERT INTO slider ('h1', 'h2', 'data-bg', 'data-img', 'data-url', 'status') VALUES ('Lalala', 'Lalala', 'http://localhost/mares.com.br-final/images/backgrounds/black_thumb.jpg', 'http://localhost/mares.com.br-final/images/banners/papeis_2015.png', 'http://lalala.com', 1)
But it's not working and phpMyAdmin says the syntax is incorrect.
So I tried adding a line through phpMyAdmin and it gave me back a query, I cleaned it, to take away some elements that I'm not inserting in my query, and tried it, and it works...
Here's the phpMyAdmin's query:
INSERT INTO slider (`data-img`, `data-bg`, `data-url`, `h1`, `h2`, `status`) VALUES ('images/lalal.jpg', 'images/back/lalala.jpg', 'http://lalal.com', 'Oi', 'Olá', '1')
Obs: I alredy tried to change '
for ` (the symbol to add code here) int he columns names.
The querys are identical to me, so why my query is wrong and phpMyAdmin's is not?