请教数据无法写入sqlite数据库原因

#1 phpfans

今天将数据库改为sqlite3,pdo方式,读取数据正常,但是无法写入数据,开始以为代码问题,切换回MYSQL测试添加数据可以正常写入,检查sqlite数据库的目录权限也为可写入状态,数据库使用 SQLite Developer创建,以前自己写代码操作没有出现过类似问题,请问是什么原因?

添加数据的代码

function post(){
  $types = spClass("lib_class");
  $this->type =$types->typelist();

  if($title = $this->spArgs("title")){
   $addnews = spClass("lib_news");
   $newrow = array(
    'title' => $this->spArgs('title'),
    'classid' => $this->spArgs('classid'),
    'content' => $this->spArgs('content'),
   );
   
   $addnews->create($newrow);
   $this->success("发布成功!", spUrl("admin","post"));
  }
}

2011-10-09 21:58:02

#2 jake

http://bbs.speedphp.com/thread-1042-1-1.html?tid=1042&page=1

2011-10-09 23:02:20

#3 phpfans

难道只能使用 sqliteadmin创建的sqlite?

2011-10-09 23:20:31

#4 jake

楼主已经帮忙解决了:http://bbs.speedphp.com/thread-1926-1-1.html

2011-10-10 08:50:33