易截截图软件、单文件、免安装、纯绿色、仅160KB

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);
?>


相关文档:

mysql 一些简单操作 Rubicon

了解了一些最基本的操作命令后,我们再来学习如何创建一个数据库和数据库表。
  1、使用SHOW语句找出在服务器上当前存在什么数据库:
mysql> SHOW DATABASES; +----------+
| Database | +----------+ | mysql |
| test | +----------+ 3 rows in set (0.00 sec)
  2、创建一个数据库abccs
  mysql> ......

VC++ 连接MySQL 数据库

把mysql.h复制到vc的目录的include目录下
mysql.h在你mysql的安装目录下的include里面如:mysql\include
把libmysql.lib(在mysql的安装目录下,搜索下就能找到)复制到这个目录下(C:\Program Files\Microsoft Visual Studio 9.0\VC\lib),要不连接会出错。
如果编译连接时还是出错。就把libmysql.lib复制到你源程序的目 ......

Initial Startup of MySQL Cluster


Starting the cluster is not very difficult after it has been configured. Each cluster node process must be started separately, and on the host where it resides. The management node should be started first, followed by the data nodes, and then finally by any SQL nodes:
On the management host, issu ......

Safe Shutdown and Restart of MySQL Cluster


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, “ ......

linux 安装 mysql rpm

在linux下面安装mysql,首相要根据操作系统的版本,选择对应的mysql的版本,官方网站上有非常明确的分类
http://dev.mysql.com/downloads/
在这里我实验的操作系统是redhat linux
mysql 用了两个安装包,一个是server端,一个是client,我用的是rpm包,安装的指令比较简单。
MySQL-server-community-5.1.42-0.rhel4.i38 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号