开发者

How to tell a field is nvarchar in CakePHP

I want to make sure that the strings I save to the database are properly formatted in UTF-8. I have converted some of the fields into nvarchar. To save the strings properly I need to prefix all strings with N. e.g. N'my string'.

However not all fields are necessarily nvarchar. In the DboSqlsrv class that I am using that extends DboSource, there is just the one string parameter that you can either specify as 'varchar' or 'nvarchar'.

Does anybody k开发者_开发技巧now if there is a 'cake' way to interrogate the database and check if a field is varchar or nvarchar?


this? http://book.cakephp.org/view/1066/_schema

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜