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

    598 MySQL Technical Reference for Version 4.0.3 Description Returns the thread ID of the current connection.  This value can be used as an argument to mysql_kill() to kill the thread. If the connection is lost and you reconnect with mysql_ping(), the thread ID will change. This means you should not get the thread ID and store it for later.  You should get it when you need it. Return Values The thread ID of the current connection. Errors None. 8.4.3.52  mysql_use_result() MYSQL_RES *mysql_use_result(MYSQL *mysql) Description You must call  mysql_store_result()  or  mysql_use_result()  for every query that suc- cessfully retrieves data (SELECTSHOWDESCRIBE, EXPLAIN). mysql_use_result()  initiates a result set retrieval but does not actually read the result set into the client like  mysql_store_result()  does.  Instead, each row must be retrieved individually  by  making  calls  to  mysql_fetch_row().    This  reads  the  result  of  a  query directly from the server without storing it in a temporary table or local bu er,  which is somewhat faster and uses much less memory than mysql_store_result().  The client will only allocate memory for the current row and a communication bu er that may grow up to max_allowed_packet bytes. On the other hand, you shouldn't use mysql_use_result() if you are doing a lot of pro- cessing for each row on the client side,  or if the output is sent to a screen on which the user may type a ^S (stop scroll).  This will tie up the server and prevent other threads from updating any tables from which the data is being fetched. When  using  mysql_use_result(),  you  must  execute  mysql_fetch_row()  until  a  NULL value is returned, otherwise, the unfetched rows will be returned as part of the result set for your next query.  The C API will give the error Commands out of sync; you can't run this command now if you forget to do this! You  may  not  use  mysql_data_seek(),  mysql_row_seek(),  mysql_row_tell(),  mysql_ num_rows(), or mysql_affected_rows() with a result returned from mysql_use_result(), nor  may  you  issue  other  queries  until  the  mysql_use_result()  has   nished.   (However, after you have fetched all the rows, mysql_num_rows() will accurately return the number of rows fetched.) You must call mysql_free_result() once you are done with the result set.
     

    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