I have a database table something like this...
CREATE TABLE IF NOT EXISTS `example` (
`id` varchar(78) COLLATE latin1_general_ci NOT NULL,
`username` varchar(78) COLLATE latin1_general_ci NOT NULL,
`password` varchar(78) COLLATE latin1_general_ci NOT NULL,
`reg_date` date NOT NULL,
`reg_time` time NOT NULL,
`permission` varchar(78) COLLATE latin1_general_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
Now I am performing a query from PHP is ...
INSERT INTO `example` (`id`, `username`, `password`, `reg_date`, `reg_time`, `permission`) VALUES ('j652hsL', 'example_user', 'secret', '', '', '');
This query is running Perfectly in my localhost with a warning of course but not problem in data insertion... Yes the reg_date, reg_time & permissions fields are holding 0000-00-00, 00:00:00& *Blank* respectively...But there is no problem with Insertion... Now this same Insertion Query is not running on a certain Web Server...
I have a web server and I tested it there it was running with no Error but When I shifted to different Web Server it wasn't running there... I think its a some kind of Server settings issue... But What possibly could stop it from inserting the Data?
Thanks all in advance.
INSERT INTOexample` (id,username,password,reg_date,reg_time,permission) VALUES ('j652hsL', 'example_user', 'secret', '0000-00-00', '00:00:00', 'read');`permissionsvalue it says there is no Default value set for permissions and when I don't put anything in thereg_date®_timeit says syntax error... Date & Time format incorrect...