<< previous page   --   table of contents   --   next page >>
| | | | | | | |
  • Return to Table of Contents
  • Table of Contents

    1. General Information
    2. MySQL Installation
    3. Tutorial Introduction
    4. Database Administration
    5. MySQL Optimisation
    6. MySQL Language Reference
    7. MySQL Table Types
    8. MySQL APIs
    9. Extending MySQL

    570 MySQL Technical Reference for Version 4.0.3 } However, you can achieve the same e ect with the standard MySQL error functions: mysql_query(&mysql,"SELECT * FROM some_table"); result = mysql_use_result(&mysql); while((row = mysql_fetch_row(result))) { // do something with data } if(mysql_errno(&mysql))   // mysql_fetch_row() failed due to an error { fprintf(stderr, "Error: %s\n", mysql_error(&mysql)); } 8.4.3.12  mysql_errno() unsigned int mysql_errno(MYSQL *mysql) Description For the connection speci ed by mysql, mysql_errno() returns the error code for the most recently invoked API function that can succeed or fail. A return value of zero means that no error occurred.  Client error message numbers are listed in the MySQL `errmsg.h' header le.  Server error message numbers are listed in `mysqld_error.h'.  In the MySQL source distribution you can nd a complete list of error messages and error numbers in the le `Docs/mysqld_error.txt'. Return Values An error code value.  Zero if no error occurred. Errors None. 8.4.3.13  mysql_error() char *mysql_error(MYSQL *mysql) Description For the connection speci ed by mysql,  mysql_error() returns the error message for the most  recently  invoked  API  function  that  can  succeed  or  fail.   An  empty  string  ("")  is returned if no error occurred.  This means the following two tests are equivalent: if(mysql_errno(&mysql)) {
     

    Customer Support CentreMySQL Reference Manual

    Web Hosting Services
    UNIX WEB HOSTING
    MERCHANT ACCOUNTS
    DEDICATED SERVERS
    E-COMMERCE HOSTING
    SUPPORT & FAQ's
    TERMS OF USE
    Domain Services
    DOMAIN
    REGISTRATION
    MANAGE
    YOUR ACCOUNT
    SUPPORT & FAQ's
    TERMS OF USE
    Corporate Info
    ABOUT US
    OUR NETWORK
    CONTACT US
    SITE MAP
    Copyright © 2002 Dyntex Group, Inc. All Rights Reserved
  • Return to Table of Contents
  • Back to top

  • Web Hosting: Manuals & FAQ's

    1. Unix-Based Web Hosting
    2. Unix Dedicated Servers
    3. Windows Dedicated Servers
    4. CuteFTP User’s Guide
    5. CuteHTML User’s Guide
    6. WS_FTP Pro User's Guide
    7. Miva Order User's Guide
    8. Miva Merchant User's Guide