To avoid this error Out of range value adjusted for column there are possible three solutions but I prefer solution 1 and solution 2.
Solution 1
Use functionality of SQL_MODE
Just Login to the mysql shell and use this command to avoid the error
SET GLOBAL SQL_MODE=”;
It will fix your problem.
Solution 2
Modification in insert query
Sometimes our website hosting company (incase if website is hosted by website hosting company) doesn’t give us permission to use SQL_MODE or sometimes we want to quicker solve this error without contacting the hosting company of our website then use insert query like this
$sql="insert into student values('Adeel', 'Fakhar')";
Instead of $sql="insert into student values('', 'Adeel', 'Fakhar')";
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment