1、CREATE TABLE todo ( id serial primary key, title text, created timestamp default now(), done boolean default 'f' );
在mysql5.1.47 中出错,提示done错误的defalt值 搜索后找到一段这样的资料 The default value for the boolean type property may be set to to 'true' or 'false'. It needs to be translated to 1 or 0 before it is sent to be set in the database. An FDO boolean is mapped into MySQL tinyint. 把'f'改为0就成功了
2、连接mysql的问题 安装MySQL-python-1.2.2.win32-py2.6这个版本,少不少事 运行后出现报错;出现File "C:\Python26\lib\site-packages\MySQLdb\__init__.py", line 19, in <module> 是缺少2个dll文件分别为 libguide40.dll和libmmd.dll
3.pythonpath的问题 在环境变量里的用户变量里设置pythonpath,可以的idle中import新增目录中的模块,但是不能直接访问该目录中文件
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有