<?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; adodb</title>
	<atom:link href="http://www.simcn.com/tag/adodb/feed" rel="self" type="application/rss+xml" />
	<link>http://www.simcn.com</link>
	<description>网站开发, 前端开发, 高性能前端开发</description>
	<lastBuildDate>Thu, 03 Nov 2011 02:08:49 +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>adodb 事务，行锁定</title>
		<link>http://www.simcn.com/adodb-%e4%ba%8b%e5%8a%a1%ef%bc%8c%e8%a1%8c%e9%94%81%e5%ae%9a</link>
		<comments>http://www.simcn.com/adodb-%e4%ba%8b%e5%8a%a1%ef%bc%8c%e8%a1%8c%e9%94%81%e5%ae%9a#comments</comments>
		<pubDate>Tue, 03 Feb 2009 01:52:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[默认分类]]></category>
		<category><![CDATA[adodb]]></category>
		<category><![CDATA[rowlock]]></category>

		<guid isPermaLink="false">http://www.simcn.com/?p=127</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<pre class="brush:php">
<?php
// ... 

$adodb->startTrans(); 

//实际，getOne所调用的查询也可以直接放到rowLock来进行，这里只是为了演示效果能更明显些。

$adodb->rowLock('book', 'book_id = 123'); 

$bookNumber = $adodb->getOne("SELECT book_number FROM book WHERE  book_id = 123"); 

$adodb->execute("UPDATE book SET book_number = book_number - 1 WHERE  book_id = 123"); 

$adodb->completeTrans(); 

// ...
?>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.simcn.com/adodb-%e4%ba%8b%e5%8a%a1%ef%bc%8c%e8%a1%8c%e9%94%81%e5%ae%9a/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

