Quote:
Originally Posted by muukis
They were not random things... did you try to comprehend my msg at all? (God knows I can be uncomprehensive sometimes )
I'm not being hostile here. Just... giving my 5 cents... that's all.
Ok... try this in your DB:
Run this first to create the example table...
And then try running this query...
See... no random bolding?
My MySQL gives me this error...
Code:
1364 - Field 'f_counter' doesn't have a default value
Using that error code, you can look up yourself the article from MySQL site, what went wrong.
|
Here's my exact mysql output.
PHP Code:
mysql> use f7lans_l4dstats;
Database changed
mysql> CREATE TABLE `t_table` (
-> `f_text` varchar(256) NOT NULL,
-> `f_counter` int(10) NOT NULL,
-> PRIMARY KEY (`f_text`)
-> );
Query OK, 0 rows affected (0.11 sec)
mysql> insert into t_table (f_text) values ('something');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> select * from t_table;
+-----------+-----------+
| f_text | f_counter |
+-----------+-----------+
| something | 0 |
+-----------+-----------+
1 row in set (0.00 sec)
mysql>
No errors. I got a warning but that's it, and it obviously worked. I looked up that error code, I found this bug report:
http://bugs.mysql.com/bug.php?id=38173
Quote:
The reason for the bug was incompatibile with the master side behaviour.
INSERT query on the master is allowed to insert into a table without specifying
values of DEFAULT-less fields as well provided that
sql_mode is not strict.
|
Either you have sql_mode set to strict, or you need to upgrade/update your MySQL.
__________________