<?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; Database</title>
	<atom:link href="http://twycf.com/wordpress/archives/category/database/feed" rel="self" type="application/rss+xml" />
	<link>http://twycf.com/wordpress</link>
	<description>工作、休閒之類的雜記</description>
	<lastBuildDate>Wed, 18 Nov 2009 15:20:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>使用 transaction 的疑問</title>
		<link>http://twycf.com/wordpress/archives/144</link>
		<comments>http://twycf.com/wordpress/archives/144#comments</comments>
		<pubDate>Sun, 24 Dec 2006 09:15:57 +0000</pubDate>
		<dc:creator>shinnlu</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://twycf.com/wordpress/archives/144</guid>
		<description><![CDATA[這幾天剛好要實作一個程式，這是一隻資料庫程式，而資料庫是使用 Mysql。程式本身沒什麼好講的，但是卻需要使用 Transaction，突然想起很久以前使用 Mysql + Transaction 碰到的問題，連忙翻出舊的電腦記錄，在這裡直接貼上來：
=====
Q:使用 transaction 的疑問：
一定要用 InnoDB、BDB 才能用 Trans，但 InnoDB 不支援 AUTO_INCREMENT 在多個 Key 裡，
所以有 AUTO_INCREMENT multi-key table只能用 BDB，但 dreamhost 不支援 BDB!!!!!!!!!!
A:自己抓 AUTO_INCREMENT 值
=====
這個問題是在 Mysql Server 3.23.49 上測試的，而 InnoDB 在 Mysql 5.0 己經 AUTO_INCREMENT 欄位，但是 InnoDB 的 AUTO_INCREMENT 是每次向資料庫查詢而得來，而這個值並不會寫入磁碟，而是存在記憶體裡，引述一段官方文件：
If you specify an AUTO_INCREMENT column for an InnoDB table, the table handle in [...]]]></description>
		<wfw:commentRss>http://twycf.com/wordpress/archives/144/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BCB 6 與 mysql 的連接方式</title>
		<link>http://twycf.com/wordpress/archives/143</link>
		<comments>http://twycf.com/wordpress/archives/143#comments</comments>
		<pubDate>Sun, 24 Dec 2006 08:47:41 +0000</pubDate>
		<dc:creator>shinnlu</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://twycf.com/wordpress/archives/143</guid>
		<description><![CDATA[這一陣子突然又有 BCB 6 連接 mysql 的需求，筍子印象中依稀記得有一個 odbc connector 要安裝，上網 google 的結果，在 mysql 的網站有提供 Mysql ODBC Connector 下載，可以略過上面的註冊提示，直接到下方的連結下載。
安裝後 BCB 6 可以正常抓到 Mysql 的資料，測試環境：
Windows Server 2003 Ent(SP1)Borland C++ Builder 6 (Update Pack 4)Mysql Server 3.23.49Mysql Connector ODBC-3.51.12
]]></description>
		<wfw:commentRss>http://twycf.com/wordpress/archives/143/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>phpMyAdmin 開啟 UTF-8 編碼功能</title>
		<link>http://twycf.com/wordpress/archives/141</link>
		<comments>http://twycf.com/wordpress/archives/141#comments</comments>
		<pubDate>Sun, 24 Dec 2006 08:31:55 +0000</pubDate>
		<dc:creator>shinnlu</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://twycf.com/wordpress/archives/141</guid>
		<description><![CDATA[這一陣子為了要讀取 UTF-8 的資料庫，而下載了 phpMyAdmin 的新版本，沒想到新版的操作方式還真麻煩，基本的伺服器設定很簡單，但還有一些雜七雜八的設定完全搞不懂，只好退而求其次，使用原本的 phpMyAdmin 2.5.7-pl1，上網 google 一下，在 neo&#8217;s Blog 找到一篇phpMyAdmin 開啟 UTF-8 編碼相關功能
主要的設定如 Neo 所述如下：
1.打開 config.inc.php ，把以下的變數都改為 utf-8 :
$cfg['DefaultLang'] = 'utf-8';$cfg['DefaultCharset'] = 'utf-8';
2.這個看看裡面有沒有 utf-8 ，沒有的話就自己加進去:
$cfg['AvailableCharsets'] = array(:&#160;&#160; &#160;'utf-8',:);
3.把AllowAnywhereRecoding = FALSE 改成 TRUE
$cfg['AllowAnywhereRecoding'] = TRUE;
也許是我的版本(2.5.7-pl1)和 Neo(2.5.5 pl-1) 不一樣的關係，改了上述設定還是沒有出現正確的下拉選單，看了一下程式碼
/main.phpif (isset($cfg['AllowAnywhereRecoding']) &#38;&#38; $cfg['AllowAnywhereRecoding']&#160;&#160; &#160;&#38;&#38; $allow_recoding) {...}
要讓語言下拉選單出現的依據是 AllowAnywhereRecoding、allow_recoding 兩個變數，第一個變數在測試時是成功的，因為步驟3己經設定過了，但是 allow_recoding 卻不成立，利用 PowerGrep 搜尋全部的程式碼發現因為 allow_recoding 設定的先後順序錯誤，導致選單無法出現，在這邊提供不負責的懶人解法如下：
$allow_recoding = TRUE;//force [...]]]></description>
		<wfw:commentRss>http://twycf.com/wordpress/archives/141/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

