mysql 连接orcal 数据库 OCIDefineByName
Oracle 8 資料庫函式庫
OCIDefineByName
讓 SELECT 指令可使用 PHP 變數。
語法: boolean OCIDefineByName(int stmt, string ColumnName, mixed &variable, int [type]);
傳回值: 布林值
函式種類: 資料庫功能
內容說明
本函式用來定義指定的 PHP 變數,使其能供 SQL 指令中的 SELECT 指令使用。在大小寫的問題上要注意一下,因為 Oracle 資料庫中的欄位名稱其實都是大寫的名字。參數 stmt 是經過 Oracle 解析 (OCIParse) 後的字串指標。參數 ColumnName 是 Oracle 資料表上的欄位名稱。參數 variable 前面一定要加 & 符號,表 PHP 變數位址。參數 type 通常省略。值得注意的是欲使用 Oracle 8 中特有的新資料型態 LOB/ROWID/BFILE 等時,需要先執行 OCINewDescriptor() 函式。執行本函式成功則傳回 true 值。
使用範例
這個範例是 thies@digicol.de 所提出的
<?php
$conn = OCILogon("scott","tiger");
$stmt = OCIParse($conn,"select empno, ename from emp");
/* 使用 OCIDefineByName 要在執行 OCIExecute 前 */
OCIDefineByName($stmt,"EMPNO",&$empno);
OCIDefineByName($stmt,"ENAME",&$ename);
OCIExecute($stmt);
while (OCIFetch($stmt)) {
echo "empno:".$empno."\n";
echo "ename:".$ename."\n";
}
OCIFreeStatement($stmt);
OCILogoff($conn);
?>
相关文档:
以下内容在ubuntu 9.04 server系统上测试通过
用apt-get install vsftp安装的时候相关的文件位置:
主配置文件:/etc/vsftpd.conf
验证配置文件/etc/pam.d/vsftpd
重启:/etc/init.d/vsftpd restart
vsftp Mysql验证方式:
MYSQL已经安装在/usr/local/mysql
直接安装vsftp
sudo apt-get install vsftp
安装pam_mys ......
需注意以下三点:
1、创建数据库的时候:CREATE DATABASE `database`
CHARACTER SET 'utf8'
  ......
To shut down the cluster, enter the following command in a shell
on the machine hosting the management node:
shell> ndb_mgm -e shutdown
The -e
option here is used to pass a command to
the ndb_mgm
client from the shell. (See
Section 4.23, “ ......
-static 13%
--with-client-ldflags=-all-static
--with-mysqld-ldflags=-all-static
静态链接提高13%性能
Unix Socket 7.5%
--with-unix-socket path=/usr/local/mysql/tmp/mysql.sock
使用unix套接字链接提高7.5%性能,所以在windows下mysql性能肯定不如unix下面
--enab ......
记得前天有人问我, Memcache 和 MySQL 自己的 Query Cache 有啥区别? 我这样回答的,前者是山寨中的战斗机,后者是官方的战斗机。
新手回答问题,错了莫怪。哈哈哈。
好像细节上的差别还是有的。
Memcache优点如下:
1. 理论上可以支撑无限并发业务操作。
2. 可以启用单独的实例来缓存巨多的数据。(当 ......