Mysql and PHP Abstract

Mysql and PHP Abstract

MySQL and PHP Abstract This manual describes the PHP extensions and interfaces that can be used with MySQL. For legal information, see the Legal Notices. For help with using MySQL, please visit the MySQL Forums, where you can discuss your issues with other MySQL users. Document generated on: 2021-09-23 (revision: 70881) Table of Contents Preface and Legal Notices ............................................................................................................... xiii 1 Introduction to the MySQL PHP API ................................................................................................ 1 2 Overview of the MySQL PHP drivers ............................................................................................... 3 2.1 Introduction .......................................................................................................................... 3 2.2 Terminology overview ........................................................................................................... 3 2.3 Choosing an API .................................................................................................................. 4 2.4 Choosing a library ................................................................................................................ 5 2.5 Concepts .............................................................................................................................. 7 2.5.1 Buffered and Unbuffered queries ................................................................................ 7 2.5.2 Character sets ........................................................................................................... 8 3 MySQL Improved Extension ........................................................................................................... 11 3.1 Overview ............................................................................................................................ 13 3.2 Quick start guide ................................................................................................................ 17 3.2.1 Dual procedural and object-oriented interface ............................................................ 17 3.2.2 Connections ............................................................................................................. 19 3.2.3 Executing statements ............................................................................................... 21 3.2.4 Prepared Statements ............................................................................................... 24 3.2.5 Stored Procedures ................................................................................................... 30 3.2.6 Multiple Statements ................................................................................................. 34 3.2.7 API support for transactions ..................................................................................... 36 3.2.8 Metadata ................................................................................................................. 37 3.3 Installing/Configuring ........................................................................................................... 39 3.3.1 Requirements .......................................................................................................... 39 3.3.2 Installation ............................................................................................................... 39 3.3.3 Runtime Configuration .............................................................................................. 41 3.3.4 Resource Types ...................................................................................................... 42 3.4 The mysqli Extension and Persistent Connections ................................................................ 42 3.5 Predefined Constants ......................................................................................................... 43 3.6 Notes ................................................................................................................................. 47 3.7 The MySQLi Extension Function Summary .......................................................................... 48 3.8 The mysqli class ................................................................................................................ 54 3.8.1 mysqli::$affected_rows, mysqli_affected_rows ......................................... 57 3.8.2 mysqli::autocommit, mysqli_autocommit ....................................................... 59 3.8.3 mysqli::begin_transaction, mysqli_begin_transaction ........................... 62 3.8.4 mysqli::change_user, mysqli_change_user ................................................... 65 3.8.5 mysqli::character_set_name, mysqli_character_set_name ....................... 67 3.8.6 mysqli::close, mysqli_close ........................................................................... 69 3.8.7 mysqli::commit, mysqli_commit ....................................................................... 70 3.8.8 mysqli::$connect_errno, mysqli_connect_errno ......................................... 71 3.8.9 mysqli::$connect_error, mysqli_connect_error ......................................... 72 3.8.10 mysqli::__construct, mysqli::connect, mysqli_connect .......................... 73 3.8.11 mysqli::debug, mysqli_debug ......................................................................... 77 3.8.12 mysqli::dump_debug_info, mysqli_dump_debug_info .................................. 78 3.8.13 mysqli::$errno, mysqli_errno ....................................................................... 79 3.8.14 mysqli::$error_list, mysqli_error_list ................................................... 81 3.8.15 mysqli::$error, mysqli_error ....................................................................... 82 3.8.16 mysqli::$field_count, mysqli_field_count ............................................... 84 3.8.17 mysqli::get_charset, mysqli_get_charset ................................................. 85 3.8.18 mysqli::$client_info, mysqli::get_client_info, mysqli_get_client_info ............................................................................................ 87 3.8.19 mysqli::$client_version, mysqli_get_client_version ............................ 88 iii MySQL and PHP 3.8.20 mysqli::get_connection_stats, mysqli_get_connection_stats .............. 89 3.8.21 mysqli::$host_info, mysqli_get_host_info ............................................... 92 3.8.22 mysqli::$protocol_version, mysqli_get_proto_info ................................ 93 3.8.23 mysqli::$server_info, mysqli::get_server_info, mysqli_get_server_info ............................................................................................ 94 3.8.24 mysqli::$server_version, mysqli_get_server_version ............................ 96 3.8.25 mysqli::get_warnings, mysqli_get_warnings ............................................. 98 3.8.26 mysqli::$info, mysqli_info ........................................................................... 98 3.8.27 mysqli::init, mysqli_init ........................................................................... 100 3.8.28 mysqli::$insert_id, mysqli_insert_id ...................................................... 101 3.8.29 mysqli::kill, mysqli_kill ........................................................................... 102 3.8.30 mysqli::more_results, mysqli_more_results ............................................ 104 3.8.31 mysqli::multi_query, mysqli_multi_query ................................................ 105 3.8.32 mysqli::next_result, mysqli_next_result ................................................ 107 3.8.33 mysqli::options, mysqli_options ............................................................... 108 3.8.34 mysqli::ping, mysqli_ping ........................................................................... 110 3.8.35 mysqli::poll, mysqli_poll ........................................................................... 111 3.8.36 mysqli::prepare, mysqli_prepare ............................................................... 113 3.8.37 mysqli::query, mysqli_query ....................................................................... 115 3.8.38 mysqli::real_connect, mysqli_real_connect ............................................ 118 3.8.39 mysqli::real_escape_string, mysqli_real_escape_string .................... 122 3.8.40 mysqli::real_query, mysqli_real_query .................................................... 124 3.8.41 mysqli::reap_async_query, mysqli_reap_async_query ............................ 125 3.8.42 mysqli::refresh, mysqli_refresh ............................................................... 125 3.8.43 mysqli::release_savepoint, mysqli_release_savepoint ........................ 126 3.8.44 mysqli::rollback, mysqli_rollback ........................................................... 127 3.8.45 mysqli::savepoint, mysqli_savepoint ........................................................ 128 3.8.46 mysqli::select_db, mysqli_select_db ........................................................ 128 3.8.47 mysqli::set_charset, mysqli_set_charset ................................................ 130 3.8.48 mysqli::$sqlstate, mysqli_sqlstate ......................................................... 132 3.8.49 mysqli::ssl_set, mysqli_ssl_set ............................................................... 134 3.8.50 mysqli::stat, mysqli_stat ..........................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    554 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us