<< 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

    Chapter 8:  MySQL APIs 597 If  you  want  to  know  if  the  query  should  return  a  result  set  or  not,  you  can  use  mysql_ field_count() to check for this.  See Section 8.4.3.20 [mysql  eld count], page 575. mysql_store_result() reads the entire result of a query to the client, allocates a MYSQL_ RES  structure, and places the result into this structure. mysql_store_result() returns a null pointer if the query didn't return a result set (if the query was, for example, an INSERT statement). mysql_store_result()  also returns a null pointer if reading of the result set failed.  You can check if you got an error by checking if mysql_error() doesn't return a null pointer, if mysql_errno() returns <> 0, or if mysql_field_count() returns <> 0. An empty result set is returned if there are no rows returned.  (An empty result set di ers from a null pointer as a return value.) Once you have called mysql_store_result() and got a result back that isn't a null pointer, you may call mysql_num_rows() to nd out how many rows are in the result set. You can call mysql_fetch_row() to fetch rows from the result set, or mysql_row_seek() and mysql_row_tell() to obtain or set the current row position within the result set. You must call mysql_free_result() once you are done with the result set. See Section 8.4.6.1 [NULL mysql_store_result()], page 602. Return Values MYSQL_RES result structure with the results.  NULL if an error occurred. Errors CR_COMMANDS_OUT_OF_SYNC Commands were executed in an improper order. CR_OUT_OF_MEMORY Out of memory. CR_SERVER_GONE_ERROR The MySQL server has gone away. CR_SERVER_LOST The connection to the server was lost during the query. CR_UNKNOWN_ERROR An unknown error occurred. 8.4.3.51  mysql_thread_id() unsigned long mysql_thread_id(MYSQL *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