Source for file MySQL.php

Documentation is available at MySQL.php

  1. <?php
  2.     /**
  3.      * MySQL functions
  4.      *
  5.      * @copyright Copyright (c) 2004 Mirchev Ideas Ltd. All rights reserved.
  6.      * @package MIPHPF
  7.      */
  8.     
  9.     # MySQL consts
  10.     define('MI_MYSQL_DATE_FORMAT''Y-m-d');
  11.     define('MI_MYSQL_DATETIME_FORMAT''Y-m-d H:i:s');
  12.     
  13.         function sql_list_fields($dbName$table$link)
  14.         {
  15.             return @mysql_list_fields($dbName$table$link);
  16.         }
  17.         
  18.         function sql_escape_string($u)
  19.         {
  20.             return mysql_escape_string($u);
  21.         }
  22.         
  23.         function sql_real_escape_string($u$link)
  24.         {
  25.             return mysql_real_escape_string($u$link);
  26.         }
  27.         
  28.         function sql_query($query$link)
  29.         {
  30.             return @mysql_query($query$link);
  31.         }
  32.         
  33.         //[string server [, string username [, string password [, bool new_link [, int client_flags]]]]])
  34.         function sql_connect($dbHost$dbUser$dbPass$new_link false)
  35.         {
  36.             return @mysql_connect($dbHost$dbUser$dbPass$new_link);
  37.         }
  38.         
  39.         function sql_error($link)
  40.         {
  41.             if ($link === null)
  42.                 return @mysql_error();
  43.             else
  44.                 return @mysql_error($link);
  45.         }
  46.         
  47.         function sql_errno($link)
  48.         {
  49.             if ($link === null)
  50.                 return @mysql_errno();
  51.             else
  52.                 return @mysql_errno($link);
  53.         }
  54.         
  55.         function sql_select_db($dbName$link)
  56.         {
  57.             return @mysql_select_db($dbName$link);
  58.         }
  59.         
  60.         function sql_ping($link)
  61.         {
  62.             return @mysql_ping($link);
  63.         }
  64.         
  65.         function sql_insert_id($link)
  66.         {
  67.             return @mysql_insert_id($link);
  68.         }
  69.         
  70.         function sql_fetch_assoc($result)
  71.         {
  72.             return mysql_fetch_assoc($result);
  73.         }
  74.         
  75.         function sql_free_result($result)
  76.         {
  77.             return @mysql_free_result($result);
  78.         }
  79.         
  80.         function sql_num_fields($fields)
  81.         {
  82.             return mysql_num_fields($fields);
  83.         }
  84.         
  85.         function sql_field_name($result$fieldIndex)
  86.         {
  87.             return @mysql_field_name($result$fieldIndex);
  88.         }
  89. ?>

Documentation generated on Thu, 08 May 2008 16:57:29 +0300 by phpDocumentor 1.4.1