Logo Search packages:      
Sourcecode: kde-i18n version File versions

mysql.php

<?php

/* 
 *                { kde i18n team website for coordination of local translations }
 *          
 *
 *    This is the library file, all of the globally required functions should be 
 *    declared here
 *    Distributed under the terms of the GNU General Public Licence version 2 or higher
 */

 
function db_init ()
{
      global $host, $uname, $password, $dbname;
      $link = mysql_connect ($host, $uname, $password);
      mysql_select_db ($dbname, $link);
      return $link;
      
}

function db_query($sql_query, $link)
{
// $sql_query holds the sql query
// $link hold the link

$result = mysql_query ($sql_query, $link);


}

function db_result($sql_result, $row, $field)
{
// $sql_result holds the result resource
// $row holds the row that you ask for
// $field holds the field you want the result from
      if (!isset($row))
            {
                  $tmp = mysql_result($sql_result);
            }
      elseif (!isset($field))
            {
                  $tmp = mysql_result($sql_result, $row);
            }
      else
            {
                  $tmp = mysql_result($sql_result, $row, $field);
            }
return $tmp;
}

function db_fetch_row ($sql_result)
{
// $sql_result holds the result resource

$tmp = mysql_fetch_row ($sql_result);
return $tmp;
}

function db_error ()
{
$tmp = mysql_error();
return $tmp;
}

?>

Generated by  Doxygen 1.6.0   Back to index