2013年11月28日

xampp + MyQL Windows7 (1)

MySQL 文字コードの確認
cd C:\xampp\mysql\bin
mysql -u xxxx -p
show variables like 'character_set%';
show create database testdb;
xmpp_mysql.png

testdb はutf8
character-set-client はcp932
posted by a23 at 09:23| Comment(0) | xampp

2013年11月23日

xampp + Firebird Windows7 (4)

Firebird 接続 サンプル
PHP Firebird/InterBase 関数
//----------------------------------------------------------------------------------------
<HTML>
<HEAD>
<TITLE>>PHP + Firebird / Interbase Connection test</TITLE>
</HEAD>
<BODY>
<H3> PHP + Firebird / Interbase (接続テスト)</H3>
<?php
// DB アカウント定義
define("DBNAME","c:\FbSQL\DEMO252.FDB"); // データベース名
define("DBUSER","SYSDBA"); // 接続ユーザ名
define("DBPASS","masterkey"); // パスワード

// DB 接続
$dbh = ibase_connect(DBNAME,DBUSER,DBPASS,"UTF8");
if ($dbh == FALSE) {
echo 'データベースと接続できませんでした。×<BR>';
} else {
echo 'データベースと接続しました。○<BR>';
}
//-------------------------------------------------------
$result = ibase_query("SELECT * FROM Person Order By Peno");

echo "<table border='2'>
<tr>
<th>番 号</th>
<th>名 前 </th>
</tr>";

//while($row = ibase_fetch_array($result))
while($row = ibase_fetch_assoc($result))

{
echo "<tr>";
echo "<td>" . $row['PENO'] . "</td>";
echo "<td>" . $row['PENAME'] . "</td>";
echo "</tr>";
}
echo "</table>";

ibase_close($con); // DB 切断
//-------------------------------------------------------

?>

</BODY>
</HTML>
//----------------------------------------------------------------------------------------

コピペする場合は、<>が全角なので注意

実行
xa032.png

fbconnect.zip


posted by a23 at 15:50| Comment(0) | xampp

xampp + Firebird Windows7 (3)

xampp + Firebird Windows7 (3)

Firebird2.5.2インストール後、Apacheを起動
xa031.png

C:\Windowsに、fbclient.dllをコピー後起動
posted by a23 at 14:23| Comment(0) | xampp