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

    580 MySQL Technical Reference for Version 4.0.3 Return Values A  character  string  representing  additional information about  the  most  recently  executed query.  NULL if no information is available for the query. Errors None. 8.4.3.29  mysql_init() MYSQL *mysql_init(MYSQL *mysql) Description Allocates or initialises a  MYSQL  object suitable for  mysql_real_connect().  If  mysql  is a NULL  pointer, the function allocates, initialises, and returns a new object.  Otherwise, the object is initialised and the address of the object is returned.  If mysql_init() allocates a new object, it will be freed when mysql_close() is called to close the connection. Return Values An initialised MYSQL* handle.  NULL if there was insucient memory to allocate a new object. Errors In case of insucient memory, NULL is returned. 8.4.3.30  mysql_insert_id() my_ulonglong mysql_insert_id(MYSQL *mysql) Description Returns the ID generated for an AUTO_INCREMENT column by the previous query.  Use this function after you have performed an  INSERT  query into a table that contains an  AUTO_ INCREMENT   eld. Note that mysql_insert_id() returns 0 if the previous query does not generate an AUTO_ INCREMENT value.  If you need to save the value for later, be sure to call mysql_insert_id() immediately after the query that generates the value. mysql_insert_id() is updated after INSERT and UPDATE statements that generate an AUTO_ INCREMENT value or that set a column value to LAST_INSERT_ID(expr).  See Section 6.3.6.2 [Miscellaneous functions], page 439. Also note that the value of the SQL LAST_INSERT_ID() function always contains the most recently  generated  AUTO_INCREMENT  value,  and  is  not  reset  between  queries  because  the value of that function is maintained in the server.
     

    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