kodlar şu şekilde dir

<?
error_reporting(E_STRICT | E_ERROR);
define("EZSQL_VERSION","1.01");
define("OBJECT","OBJECT",true);
define("ARRAY_A","ARRAY_A",true);
define("ARRAY_N","ARRAY_N",true);

class db {

function db($dbuser, $dbpassword, $dbname, $dbhost)
{


$this->dbh = @mysql_connect($dbhost,$dbuser,$dbpassword);
if ( ! $this->dbh )
{
$this->print_error("<ol><b>Database Bağlantısı Yok !</b>");
}
$this->select($dbname);
}

function select($db)
{
if ( !@mysql_select_db($db,$this->dbh))
{
$this->print_error("Database Seçilemiyor!!!");
}
@mysql_query("SET CHARACTER SET utf8");
@mysql_query("SET CHARACTER SET 'utf8'");
@mysql_query("SET COLLATION_CONNECTION = 'utf8_general_ci'");
}

function print_error($str = "")
{
if ( !$str ) $str = mysql_error();
print "<blockquote><font face=arial size=2 color=ff0000>";
print "<b>Sql --</b> ";
print "[<font color=000077>$str</font>]";
print "</font></blockquote>";
}


function num_rows($query)
{
mysql_query($query,$this->dbh);
if(mysql_error()){
return "Sayılamıyor".$this->print_error();
}else{
return mysql_num_rows(mysql_query($query));
}
}

function query($query, $output = OBJECT)
{

$this->func_call = "\$db->query(\"$query\", $output)";
$this->last_result = null;
$this->col_info = null;
$this->last_query = $query;
$this->result = mysql_query($query,$this->dbh);
if ( mysql_error() )
{
$this->print_error();
}
else
{
if ( $this->result )
{
$i=0;
while ($i < @mysql_num_fields($this->result))
{
$this->col_info[$i] = @mysql_fetch_field($this->result);
$i++;
}
$i=0;
while ( $row = @mysql_fetch_object($this->result) )
{
$this->last_result[$i] = $row;
$i++;
}
@mysql_free_result($this->result);
if ( $i )
{
return true;
}
else
{
return false;
}
}
}
}

function get_var($query=null,$x=0,$y=0)
{
$this->func_call = "\$db->get_var(\"$query\",$x,$y)";
if ( $query )
{
$this->query($query);
}
if ( $this->last_result[$y] )
{
$values = array_values(get_object_vars($this->last_result[$y]));
}
return $values[$x]?$values[$x]:null;
}

function get_row($query=null,$y=0,$output=OBJECT)
{
$this->func_call = "\$db->get_row(\"$query\",$y,$output)";
if ( $query )
{
$this->query($query);
}

if ( $output == OBJECT )
{
return $this->last_result[$y]?$this->last_result[$y]:null;
}
elseif ( $output == ARRAY_A )
{
return $this->last_result[$y]?get_object_vars($this->last_result[$y]):null;
}
elseif ( $output == ARRAY_N )
{
return $this->last_result[$y]?array_values(get_object_vars($this->last_result[$y])):null;
}
else
{
$this->print_error(" \$db->get_row(string query,int offset,output type) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N ");
}

}

public function deleteRecords( $table, $condition, $limit )
{
$limit = ( $limit == '' ) ? '' : ' LIMIT ' . $limit;
$delete = "DELETE FROM {$table} WHERE {$condition} {$limit}";
$this->query( $delete );
}

public function updateRecords( $table, $changes, $condition )
{
$update = "UPDATE " . $table . " SET ";
foreach( $changes as $field => $value )
{
$update .= "`" . $field . "`='".$value."',";
}

// remove our trailing ,
$update = substr($update, 0, -1);
if( $condition != '' )
{
$update .= "WHERE " . $condition;
}

$this->query( $update );

return true;

}

public function insertRecords( $table, $data )
{
// setup some variables for fields and values
$fields = "";
$values = "";

// populate them
foreach ($data as $f => $v)
{
$fields .= "`$f`,";
$values .= ( is_numeric( $v ) && ( intval( $v ) == $v ) ) ? $v."," : "'".$v."',";
}

// remove our trailing ,
$fields = substr($fields, 0, -1);
// remove our trailing ,
$values = substr($values, 0, -1);

$insert = "INSERT INTO $table ({$fields}) VALUES({$values})";
$this->query( $insert );
return true;
}

function get_col($query=null,$x=0)
{
if ( $query )
{
$this->query($query);
}
for ( $i=0; $i < count($this->last_result); $i++ )
{
$new_array[$i] = $this->get_var(null,$x,$i);
}
return $new_array;
}

function get_results($query=null, $output = OBJECT)
{
$this->func_call = "\$db->get_results(\"$query\", $output)";
if ( $query )
{
$this->query($query);
}

if ( $output == OBJECT )
{
return $this->last_result;
}
elseif ( $output == ARRAY_A || $output == ARRAY_N )
{
if ( $this->last_result )
{
$i=0;
foreach( $this->last_result as $row )
{
$new_array[$i] = get_object_vars($row);
if ( $output == ARRAY_N )
{
$new_array[$i] = array_values($new_array[$i]);
}
$i++;
}
return $new_array;
}
else
{
return null;
}
}
}

function get_col_info($info_type="name",$col_offset=-1)
{
if ( $this->col_info )
{
if ( $col_offset == -1 )
{
$i=0;
foreach($this->col_info as $col )
{
$new_array[$i] = $col->{$info_type};
$i++;
}
return $new_array;
}
else
{
return $this->col_info[$col_offset]->{$info_type};
}
}
}

function vardump($mixed)
{
echo "<blockquote><font color=000090>";
echo "<pre><font face=arial>";
if ( ! $this->vardump_called )
{
echo "<font color=800080><b>ezSQL</b> (v".EZSQL_VERSION.") <b>Variable Dump..</b></font>\n\n";
}
print_r($mixed);
echo "\n\n<b>Last Query:</b> ".($this->last_query?$this->last_query:"NULL")."\n";
echo "<b>Last Function Call:</b> " . ($this->func_call?$this->func_call:"None")."\n";
echo "<b>Last Rows Returned:</b> ".count($this->last_result)."\n";
echo "</font></pre></font></blockquote>";
echo "\n<hr size=1 noshade color=dddddd>";
$this->vardump_called = true;
}

function dumpvars($mixed)
{
$this->vardump($mixed);
}

function Close()
{

}

function __destruct()
{
global $DB;
$this->Close();
}
}

function _Escape($str)
{
if(get_magic_quotes_gpc() == 1)
{
return strip_tags($str);
}
else
{
return strip_tags(addslashes($str));
}
}

?>