php man page for maxdb_warning_count

Query: maxdb_warning_count

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

MAXDB_WARNING_COUNT(3)							 1						    MAXDB_WARNING_COUNT(3)

maxdb_warning_count - Returns the number of warnings from the last query for the given link

       Procedural style

SYNOPSIS
int maxdb_warning_count (resource $link)
DESCRIPTION
Object oriented style int$maxdb->warning_count () maxdb_warning_count(3) returns the number of warnings from the last query in the connection represented by the $link parameter.
RETURN VALUES
Number of warnings or zero if there are no warnings.
EXAMPLES
Example #1 Object oriented style <?php $maxdb = new maxdb("localhost", "MONA", "RED", "DEMODB"); /* check connection */ if (maxdb_connect_errno()) { printf("Connect failed: %s ", maxdb_connect_error()); exit(); } $maxdb->query("CREATE TABLE temp.mycity LIKE hotel.city"); /* a remarkable city in Wales */ $query = "INSERT INTO temp.mycity (zip, name) VALUES('11111', 'Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch')"; $maxdb->query($query); printf ("Number of warning: %d ", $maxdb->warning_count); /* close connection */ $maxdb->close(); ?> Example #2 Procedural style <?php $link = maxdb_connect("localhost", "MONA", "RED", "DEMODB"); /* check connection */ if (maxdb_connect_errno()) { printf("Connect failed: %s ", maxdb_connect_error()); exit(); } maxdb_query($link, "CREATE TABLE temp.mycity LIKE hotel.city"); /* a remarkable long city name in Wales */ $query = "INSERT INTO temp.mycity (zip, name) VALUES('11111', 'Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch')"; maxdb_query($link, $query); printf ("Number of warning: %d ", maxdb_warning_count($link)); /* close connection */ maxdb_close($link); ?> The above example will output something similar to: Warning: maxdb_query(): -8004 POS(62) Constant must be compatible with column type and length <...> Number of warning: 0
SEE ALSO
maxdb_errno(3), maxdb_error(3), maxdb_sqlstate(3). PHP Documentation Group MAXDB_WARNING_COUNT(3)
Related Man Pages
maxdb_stmt_sqlstate(3) - php
maxdb_insert_id(3) - php
maxdb_error(3) - php
maxdb_stmt_errno(3) - php
maxdb_query(3) - php
Similar Topics in the Unix Linux Community
1
city wide connection
Linux rides pillion on Mumbai city buses
combine two values within a file
divide the file into multiple files based on the city name