已掉线,重新登录

首页 > 绿虎论坛 > 历史版块 > 编程 > PHP > 源码

标题: pdo sqlite 建表求助

作者: @Ta

时间: 2013-08-26

点击: 1305

<?php
$db=new PDO("sqlite:./db/book.db3");
$db->exec("SET NAMES utf8");
$n=$db->exec("
CREATE TABLE book(
id int autoincrement primary key,
name text not null,
zuozhe text not null,
fenlei text not null,
state text not null,
txturl text not null,
imgurl text not null,
introduce text not null,
");
echo $n;

?>

求解啊……没用过pdo sqlite 求解哪里有问题

[隐藏样式|查看源码]


『回复列表(2|隐藏机器人聊天)』

1. autoincremen@暮雨秋晨,auto_increment而且,sqlite不需要设置自动递增,主键默认会递增
(/@Ta/2013-08-26 13:31//)

2. @戒撸,谢谢……
(/@Ta/2013-08-26 13:45//)

回复需要登录

8月14日 04:26 星期四

本站由hu60wap6驱动

备案号: 京ICP备18041936号-1