﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>尘缘的博客 &#187; sqlite</title>
	<atom:link href="http://www.4wei.cn/archives/category/sqlite/feed" rel="self" type="application/rss+xml" />
	<link>http://www.4wei.cn</link>
	<description>PHP+Redis+ThinkPHP+LocoySpider+Discuz!+DEDE+PHPCMS</description>
	<lastBuildDate>Fri, 03 Feb 2012 04:20:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Sqlite批量插入速度慢的解决方法【ThinkPHP】</title>
		<link>http://www.4wei.cn/archives/1001166</link>
		<comments>http://www.4wei.cn/archives/1001166#comments</comments>
		<pubDate>Sun, 27 Mar 2011 08:28:44 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[sqlite]]></category>
		<category><![CDATA[ThinkPHP]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1001166</guid>
		<description><![CDATA[使用ThinkPHP大批量转移数据一份，结果发现SQLite插入速度慢，几分钟才插入几千条，要了我的小命了。 后来在网上找到SQLite的插入机制，知道要在插入时使用事务，可以加速。 SQLite的事务请使用begin和commit，在TP中，可以直接使用startTrans和commit；]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1001166/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQLite中Integer字段才支持自动增加，设置为主键可自增</title>
		<link>http://www.4wei.cn/archives/1001163</link>
		<comments>http://www.4wei.cn/archives/1001163#comments</comments>
		<pubDate>Sun, 27 Mar 2011 07:54:39 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1001163</guid>
		<description><![CDATA[一开始设置为int+主键，莫名发现不支持自增，茫然中。后来查到id设置为integer primary key即可]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1001163/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP+PDO+SQLITE数据库开发日志</title>
		<link>http://www.4wei.cn/archives/1000298</link>
		<comments>http://www.4wei.cn/archives/1000298#comments</comments>
		<pubDate>Fri, 04 Dec 2009 12:56:09 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1000298</guid>
		<description><![CDATA[前言，一直在关注PHP6，也一直在努力按PHP6的标准进行开发。 目前，PDO使用比较熟练。 以下总结几点经验。 一，SQLite默认使用Utf-8编码，所以，在中文方面会遇到一些问题。 为了方便操作，我建议使用utf-8编码开发，即将PHP程序文件设置为utf-8编码。这样，读取存储数据不需要再处理即可输出。 但这里要注意，UTF-8文件中，有可能出现中文数据库文件路径出错的问题，其中就有file_exists，需要将编码转换成gb2312。 如果项目已经确定了其它编码，则需要在查询数据时转换一下编码，可能会有点复杂。 二，SQLite一些特殊的查询方法。 随机查询：mysql-&#62;order by rand();sqlite-&#62;order by random();]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1000298/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP不能连接Sqlite3的解决办法</title>
		<link>http://www.4wei.cn/archives/228</link>
		<comments>http://www.4wei.cn/archives/228#comments</comments>
		<pubDate>Wed, 01 Oct 2008 06:33:01 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=228</guid>
		<description><![CDATA[火车采集器2008的商业版中,采用了Sqlite3做为默认数据库格式,以期待存放大型数据的需求. 目前,PHP5.3以前的版本还不能直接支持Sqlite3,即不支持DB3后缀的Sqlite数据库文件. 使用PHP连接Sqlite3时会报错,以下为一个解决办法: 目前找到的解决办法是使用PDO即可连接Sqlite3. 这里也回忆了一下PDO和ADOdb各是什么东东. PDO和ADOdb均是数据库抽象层.总的功能是可以实现连接多个数据库,特别适合一个程序中实现多个数据库. PDO支持数据库移植,如果你的部署将来有多种数据库,那就用它了.同时,PDO是C设计的,执行效率较高.他已经封装为PHP的扩展库组件了.运行快,效率高,我总结吧,还要安全一些,可以防SQL注入,初学,不知道有没有错. ADOdb是PHP类,是一个PHP文件,相对PDO来讲,运行效率较低,但支持性也较广泛,使用起来也简单方便. 据说Adodb也支持Sqlite,不过,ADOdb也是基于PHP的组件,那么肯定也不支持SQLite3了,所以PDO是解决这个问题的唯一办法. 当然，使用php5.3或者更高版本可以直接解决问题。 这里,表示一下茫然,Sqlite3出了有四年了吧,PHP5干什么吃的去了? 然后记下PDO的下载地址,以及PDO与SQLite的连接方法: PDO下载地址:http://pecl.php.net/package/pdo PDO_Sqlite 函数及语法:http://cn.php.net/manual/en/ref.pdo-sqlite.php 下载以后并行安装就可以了,PHP5.1已经内置了PDO的相关组件,我们要做的就是打开PHP.ini把PDO和PDO_sqlite启用了 启用PDO和PDO_dqlite以后,我就开始写一段测试代码,拷了一个任务数据库到程序目录中以备测试.]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/228/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sqllite介绍,下载,进阶,教程</title>
		<link>http://www.4wei.cn/archives/55</link>
		<comments>http://www.4wei.cn/archives/55#comments</comments>
		<pubDate>Mon, 12 May 2008 05:51:34 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[sqlite]]></category>
		<category><![CDATA[SQl]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=55</guid>
		<description><![CDATA[1、SQLite简介 SQLite第一个Alpha版本诞生于2000年5月. 至今已经有4个年头了. 而在今年的5月SQLite也迎来了一个新的里程: SQLite 3. SQLite官方网站: http://www.sqlite.org/ 2、SQLite类型 SQLite的数据类型 首先你会接触到一个让你惊讶的名词: Typelessness(无类型). 对! SQLite是无类型的. 这意味着你可以保存任何类型的数据到你所想要保存的任何表的任何列中, 无论这列声明的数据类型是什么(只有在一种情况下不是, 稍后解释). 对于SQLite来说对字段不指定类型是完全有效的. 如: Create Table ex1(a, b, c); 诚然SQLite允许忽略数据类型, 但是仍然建议在你的Create Table语句中指定数据类型. 因为数据类型对于你和其他的程序员交流, 或者你准备换掉你的数据库引擎. SQLite支持常见的数据类型, 如: CREATE TABLE ex2( a VARCHAR(10), b NVARCHAR(15), c TEXT, d INTEGER, e FLOAT, f BOOLEAN, g CLOB, h BLOB, i TIMESTAMP, j NUMERIC(10,5) k [...]]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/55/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

