dismiss Step into the future! Click here to switch to the beta php.net site
downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

mysqli_stmt::$affected_rows> <mysqli::$warning_count
[edit] Last updated: Fri, 28 Jun 2013

view this page in

The mysqli_stmt class

(PHP 5)

Introduction

Represents a prepared statement.

Class synopsis

mysqli_stmt {
/* Properties */
int $errno;
string $error;
string $sqlstate;
/* Methods */
int attr_get ( int $attr )
bool attr_set ( int $attr , int $mode )
bool bind_param ( string $types , mixed &$var1 [, mixed &$... ] )
bool bind_result ( mixed &$var1 [, mixed &$... ] )
bool close ( void )
void data_seek ( int $offset )
bool execute ( void )
bool fetch ( void )
void free_result ( void )
mysqli_result get_result ( void )
object get_warnings ( mysqli_stmt $stmt )
mixed prepare ( string $query )
bool reset ( void )
mysqli_result result_metadata ( void )
bool send_long_data ( int $param_nr , string $data )
bool store_result ( void )
}

Table of Contents



add a note add a note User Contributed Notes mysqli_stmt - [1 notes]
up
0
krapfi at gmail dot com
5 years ago
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

 
show source | credits | stats | sitemap | contact | advertising | mirror sites