FilChi Weblog

Archive for the ‘MySQL’ Category


If it happens to you that when you add a new record when scaffolding in cakephp 1.2 beta version, check if your mysql version is 5.1 or later, and check in my.ini of your mysql server and remove that “STRICT_TRANS_TABLES” setting, and then your cake scaffold will work just fine.

(source: http://groups.google.fr/group/cake-php/browse_thread/thread/a0b1a35c1909d5db )

Note: I think this is just a temporary fix. I was informed in irc that this bug is already fixed. It is advisable to get the latest code thru svn.

Advertisements

I was debugging this SQL statement in MSSQL and it says

“Syntax error converting the varchar value ‘LDI ‘ to a column of data type int. ”

I realized that this was due to the part where in the “Where” clause that compares the value of a char column with an integer, like for example,

agent_code = 942,

when it should be

agent_code = '942'

unlike,

where in mysql,
I could just compare the column with a value regardless of its type.
It could be already a known common difference between MSSQL and MySQL when comparing column values of different types, but I guess I just have to blog about it.