1、CREATE TABLE todo (
id serial primary key,
title text,
created timestamp default now(),
done boolean default 'f' );
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就成功了
搜索后找到一段这样的资料
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
安装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新增目录中的模块,但是不能直接访问该目录中文件
在环境变量里的用户变量里设置pythonpath,可以的idle中import新增目录中的模块,但是不能直接访问该目录中文件