Mysqli
在线手册:中文  英文

MySQLi_STMT类

(PHP 5)

简介

代表一个prepared语句。

类摘要

MySQLi_STMT {
/* 属性 */
/* 方法 */
int mysqli_stmt_affected_rows ( mysqli_stmt $stmt )
int mysqli_stmt::attr_get ( int $attr )
bool mysqli_stmt::attr_set ( int $attr , int $mode )
bool mysqli_stmt::bind_param ( string $types , mixed &$var1 [, mixed &$... ] )
bool mysqli_stmt::bind_result ( mixed &$var1 [, mixed &$... ] )
bool mysqli_stmt::close ( void )
void mysqli_stmt::data_seek ( int $offset )
int mysqli_stmt_errno ( mysqli_stmt $stmt )
array mysqli_stmt_error_list ( mysqli_stmt $stmt )
string mysqli_stmt_error ( mysqli_stmt $stmt )
bool mysqli_stmt::execute ( void )
bool mysqli_stmt::fetch ( void )
int mysqli_stmt_field_count ( mysqli_stmt $stmt )
mysqli_result mysqli_stmt::get_result ( void )
mixed mysqli_stmt_insert_id ( mysqli_stmt $stmt )
public bool mysqli_stmt::more_results ( void )
public bool mysqli_stmt::next_result ( void )
int mysqli_stmt_num_rows ( mysqli_stmt $stmt )
int mysqli_stmt_param_count ( mysqli_stmt $stmt )
mixed mysqli_stmt::prepare ( string $query )
bool mysqli_stmt::reset ( void )
mysqli_result mysqli_stmt::result_metadata ( void )
bool mysqli_stmt::send_long_data ( int $param_nr , string $data )
string mysqli_stmt_sqlstate ( mysqli_stmt $stmt )
}

Table of Contents


Mysqli
在线手册:中文  英文

用户评论:

krapfi at gmail dot com (2008-05-20 06:35:52)

The prototype of the mysqli_stmt constructor is mysqli_stmt::__construct(mysqli $link, $query);
To extend mysqli_stmt, do
class myStmt extends mysqli_stmt {
public function __construct($link, $query) {
parent::__construct($link, $query);
}
}
class myI extends mysqli {
public function prepare($query) {
return new myStmt($this, $query);
}
}
http://blog.myhat.de/2007/06/26/pdo-and-extending-mysqli/ has further infos including how to extend mysqli_result

易百教程