Table of Contents

Syntax

string mysql_info([resource $res])

(PHP 4 >= 4.30, PHP 5)

$res The database connection resource that we want to use.
RETURNS Detailed information about the last query.

What it Does

Returns information about the last query run against the MySQL database. This information includes:

  • records affected
  • records duplicated
  • warnings generated
  • records deleted
  • records skipped
  • rows matched
  • rows changed

Example

// open the mysql resource
$res = mysql_connect($server, $user, $pass);
 
// insert a single row into tblState
mysql_query('INSERT * INTO tblState (\'California\')', $res);
 
// get the error number
$minfo = mysql_info($res);
 
mysql_info.txt · Last modified: Apr 18, 2008 - 2:01pm (external edit)
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki