View Single Post
msleeper
Veteran Member
Join Date: May 2008
Location: Atlanta, Jawjuh
Old 04-24-2009 , 17:15   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #388

Quote:
Originally Posted by muukis View Post
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_textvarchar(256NOT NULL,
    ->   `
f_counterint(10NOT NULL,
    ->   
PRIMARY KEY  (`f_text`)
    -> );
Query OK0 rows affected (0.11 sec)

mysqlinsert into t_table (f_textvalues ('something');
Query OK1 row affected1 warning (0.00 sec)

mysqlselect from t_table;
+-----------+-----------+
f_text    f_counter |
+-----------+-----------+
something |         
+-----------+-----------+
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.
__________________
msleeper is offline