downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/mysql.constants.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/book.mysql.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'mysql.constants.php',
   
1 => 'Predefined Constants',
  ),
 
'up' =>
  array (
   
0 => 'book.mysql.php',
   
1 => 'MySQL',
  ),
 
'prev' =>
  array (
   
0 => 'mysql.resources.php',
   
1 => 'Resource Types',
  ),
 
'next' =>
  array (
   
0 => 'mysql.examples.php',
   
1 => 'Examples',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div>
 <h1>Predefined Constants</h1>

 <p class="simpara">
The constants below are defined by this extension, and
will only be available when the extension has either
been compiled into PHP or dynamically loaded at runtime.
</p>
 <p class="para">
  Since PHP 4.3.0 it is possible to specify additional client flags for the
  <a href="function.mysql-connect.php" class="function">mysql_connect()</a> and <a href="function.mysql-pconnect.php" class="function">mysql_pconnect()</a>
  functions. The following constants are defined:
  </p><table class="doctable table">
   <caption><b>MySQL client constants</b></caption>
   
     <thead valign="middle">
      <tr valign="middle">
       <th>Constant</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody valign="middle" class="tbody">
      <tr valign="middle">
       <td align="left"><b><tt class="constant">MYSQL_CLIENT_COMPRESS</tt></b></td>
       <td align="left">Use compression protocol</td>
      </tr>

      <tr valign="middle">
       <td align="left"><b><tt class="constant">MYSQL_CLIENT_IGNORE_SPACE</tt></b></td>
       <td align="left">Allow space after function names</td>
      </tr>

      <tr valign="middle">
       <td align="left"><b><tt class="constant">MYSQL_CLIENT_INTERACTIVE</tt></b></td>
       <td align="left">Allow interactive_timeout seconds (instead of <span class="option">wait_timeout</span>) of
        inactivity before closing the connection.</td>
      </tr>

      <tr valign="middle">
       <td align="left"><b><tt class="constant">MYSQL_CLIENT_SSL</tt></b></td>
       <td align="left">Use SSL encryption. This flag is only available with version 4.x
        of the MySQL client library or newer. Version 3.23.x is bundled both
        with PHP 4 and Windows binaries of PHP 5.
       </td>
      </tr>

     </tbody>
   
  </table>
<p>
 </p>

 <p class="para">
  The function <a href="function.mysql-fetch-array.php" class="function">mysql_fetch_array()</a> uses a constant for
  the different types of result arrays. The following constants are
  defined:
  </p><table class="doctable table">
   <caption><b>MySQL fetch constants</b></caption>
  
    <thead valign="middle">
     <tr valign="middle">
      <th>Constant</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody valign="middle" class="tbody">
     <tr valign="middle">
      <td align="left"><b><tt class="constant">MYSQL_ASSOC</tt></b></td>
      <td align="left">
       Columns are returned into the array having the fieldname as the array
       index.
      </td>
     </tr>

     <tr valign="middle">
      <td align="left"><b><tt class="constant">MYSQL_BOTH</tt></b></td>
      <td align="left">
       Columns are returned into the array having both a numerical index
       and the fieldname as the array index.
      </td>
     </tr>

     <tr valign="middle">
      <td align="left"><b><tt class="constant">MYSQL_NUM</tt></b></td>
      <td align="left">
       Columns are returned into the array having a numerical index to the
       fields. This index starts with 0, the first field in the result.
      </td>
     </tr>

    </tbody>
  
  </table>
<p>
 </p>
</div>
<?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites