0

So my table is set up the way it is supposed to but when I run this:

INSERT INTO 'users' ('id', 'username', 'password', 'email', 'phone', 'name', 'created_at', 'updated_at') VALUES
(1, 'john', 'johndoe', 'johndoe@gmail.com', '123456', 'John', '2013-06-07 08:13:28', '2013-06-07 08:13:28'),
(2, 'amy', 'amy.deg', 'amy@outlook.com', '1234567', 'amy', '2013-06-07 08:14:49', '2013-06-07 08:14:49');

It doesn't do anything.

chris85
  • 23,846
  • 7
  • 34
  • 51
Ivan
  • 27
  • 1
  • 6
  • Quotes are for strings. Backticks are for tables/columns. Also no PHP here and `phpmyadmin` is just an interface for executing mysql queries. – chris85 Oct 23 '16 at 16:40
  • So how would I get this query to work? I'm rather new to all of this. – Ivan Oct 23 '16 at 16:46
  • All the quotes in `'users' ('id', 'username', 'password', 'email', 'phone', 'name', 'created_at', 'updated_at')` should be backticks, or no encapsulating, none appear to be reserved names to me so I think they'll be fine as plain text. If not you should get an error informing you of where the error is. – chris85 Oct 23 '16 at 16:47
  • Doesn't seem to be working.. It doesn't return anything.. – Ivan Oct 23 '16 at 17:18
  • Does it throw an error or just not insert? Is `id` set to auto-increment? Update the question with your corrected code. – chris85 Oct 23 '16 at 17:47

0 Answers0