PHP: maxdb_warning_count - Manual in Deutsh
PHP: maxdb_warning_count - Manual in French
PHP: maxdb_warning_count - Manual in Polish

You Are At PHP: maxdb_warning_count - Manual Area


recent searches:
include functions , variable functions , post functions...




If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.

PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.

PHP Manual
PrevNext

maxdb_warning_count

(PECL)

maxdb_warning_count

(no version information, might be only in CVS)

maxdb->warning_count -- Returns the number of warnings from the last query for the given link

Description

Procedural style:

int maxdb_warning_count ( resource link )

Object oriented style (property):

class maxdb {

int warning_count

}

maxdb_warning_count() 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.

See also

maxdb_errno(), maxdb_error(), maxdb_sqlstate()

Example

Example 1. Object oriented style

<?php
$maxdb
= new maxdb("localhost", "MONA", "RED", "DEMODB");

/* check connection */
if (maxdb_connect_errno()) {
   
printf("Connect failed: %s\n", 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\n", $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\n", 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\n", maxdb_warning_count($link));

/* close connection */
maxdb_close($link);
?>

The above examples would produce the following output:

Warning: maxdb_query(): -8004 POS(62) Constant must be compatible with column type and length <...>
Number of warning: 0

najlepsza strona darmo gra profesjonalne wyniki
fizjoterapia
fotograf lublin
Najsmaczniejsze obiady łodź
całodobowa pomoc drogowa Rzeszów

Another Useful functions:


ref.maxdb | function.maxdb-warning-count | function.maxdb-use-result | function.maxdb-thread-safe | function.maxdb-thread-id | function.maxdb-store-result | function.maxdb-stmt-store-result | function.maxdb-stmt-sqlstate | function.maxdb-stmt-send-long-data | function.maxdb-stmt-result-metadata | function.maxdb-stmt-reset | function.maxdb-stmt-prepare | function.maxdb-stmt-param-count | function.maxdb-stmt-num-rows | function.maxdb-stmt-init | function.maxdb-stmt-free-result | function.maxdb-stmt-fetch | function.maxdb-stmt-execute | function.maxdb-stmt-error | function.maxdb-stmt-errno | function.maxdb-stmt-data-seek | function.maxdb-stmt-close | function.maxdb-stmt-close-long-data | function.maxdb-stmt-bind-result | function.maxdb-stmt-bind-param | function.maxdb-stmt-affected-rows | function.maxdb-stat | function.maxdb-ssl-set | function.maxdb-sqlstate | function.maxdb-set-opt | function.maxdb-server-init | function.maxdb-server-end | function.maxdb-send-query | function.maxdb-send-long-data | function.maxdb-select-db | function.maxdb-rpl-query-type | function.maxdb-rpl-probe | function.maxdb-rpl-parse-enabled | function.maxdb-rollback | function.maxdb-report | function.maxdb-real-query | function.maxdb-real-escape-string | function.maxdb-real-connect | function.maxdb-query | function.maxdb-prepare | function.maxdb-ping | function.maxdb-param-count | function.maxdb-options | function.maxdb-num-rows | function.maxdb-num-fields | function.maxdb-next-result | function.maxdb-multi-query | function.maxdb-more-results | function.maxdb-master-query | function.maxdb-kill | function.maxdb-insert-id | function.maxdb-init | function.maxdb-info | function.maxdb-get-server-version | function.maxdb-get-server-info | function.maxdb-get-proto-info | function.maxdb-get-metadata | function.maxdb-get-host-info | function.maxdb-get-client-version | function.maxdb-get-client-info | function.maxdb-free-result | function.maxdb-field-tell | function.maxdb-field-seek | function.maxdb-field-count | function.maxdb-fetch | function.maxdb-fetch-row | function.maxdb-fetch-object | function.maxdb-fetch-lengths | function.maxdb-fetch-fields | function.maxdb-fetch-field | function.maxdb-fetch-field-direct | function.maxdb-fetch-assoc | function.maxdb-fetch-array | function.maxdb-execute | function.maxdb-escape-string | function.maxdb-error | function.maxdb-errno | function.maxdb-enable-rpl-parse | function.maxdb-enable-reads-from-master | function.maxdb-embedded-connect | function.maxdb-dump-debug-info | function.maxdb-disable-rpl-parse | function.maxdb-disable-reads-from-master | function.maxdb-debug | function.maxdb-data-seek | function.maxdb-connect | function.maxdb-connect-error | function.maxdb-connect-errno | function.maxdb-commit | function.maxdb-close | function.maxdb-close-long-data | function.maxdb-client-encoding | function.maxdb-character-set-name | function.maxdb-change-user | function.maxdb-bind-result | function.maxdb-bind-param | function.maxdb-autocommit | function.maxdb-affected-rows |


PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.