Page 1 of 1

Table row is not adding !!!

Posted: Wed Apr 16, 2014 10:43 pm
by fahim
I'm a learner of PHP and MySQL. For learning purpose I'm trying to enter a table row using Terminal. But unfortunately, the row is not adding to the table and there is no confirmation. The code is below :

Code: Select all

INSERT INTO aliens_abduction (first_name, last_name, when_it_happened, how_long, how_many, alien_description, what_they_did, fang_spotted, other, email) VALUES ('Sally', 'Jones', '3 days ago', '1 day', 'four', 'green with six tentacles', 'We just talked and played with a dog', 'yes', 'I may have seen your dog. Contact me.', 'sally@gregs-list.net') 
When I'm issuing

Code: Select all

SELECT * FROM aliens_abduction;
It's showing
Empty set
Please help me experts how can I solve this issue. Where is my fault?

Thanks in advance.

Re: Table row is not adding !!!

Posted: Thu Apr 17, 2014 2:56 am
by requinix
If the INSERT isn't working then there was an error during the query. Use the appropriate error function according to your code (like mysqli_error) to find out why.