Changeset 389 for database.php


Ignore:
Timestamp:
Oct 8, 2008, 12:42:58 PM (16 years ago)
Author:
george
Message:
  • Upraveno: Kódování všech souborů webu bylo převedeno z ISO 8859-2 na obecné UTF-8.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • database.php

    r174 r389  
    1 <?
     1<?php
    22
    33// Extended database class
     
    77{
    88  var $Prefix = '';
    9   
     9 
    1010  function select($Table, $What = '*', $Condition = 1)
    1111  {
    1212    $Query = "SELECT ".$What." FROM `".$this->Prefix.$Table."` WHERE ".$Condition;
    13     return($this->query($Query)); 
     13    return($this->query($Query));
    1414  }
    1515
    1616  function delete($Table, $Condition)
    1717  {
    18     $this->query("DELETE FROM `".$this->Prefix.$Table."` WHERE ".$Condition); 
     18    $this->query("DELETE FROM `".$this->Prefix.$Table."` WHERE ".$Condition);
    1919  }
    20  
     20
    2121  function insert($Table, $Data)
    2222  {
     
    3232    $Name = substr($Name, 1);
    3333    $Values = substr($Values, 1);
    34     $this->query('INSERT INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES('.$Values.')'); 
     34    $this->query('INSERT INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES('.$Values.')');
    3535  }
    36  
     36
    3737  function update($Table, $Condition, $Data)
    3838  {
     
    4444      $Values .= ", ".$Key."=".$Value;
    4545    }
    46     $Values = substr($Values, 2); 
     46    $Values = substr($Values, 2);
    4747    $this->query('UPDATE `'.$this->Prefix.$Table.'` SET '.$Values.' WHERE ('.$Condition.')');
    48   }
    49  
     48  }
    5049  function replace($Table, $Data)
    5150  {
     
    6362    $this->query('REPLACE INTO `'.$this->Prefix.$Table.'` (`'.$Name.'`) VALUES('.$values.')');
    6463  }
    65  
     64
    6665  function charset($Charset)
    6766  {
Note: See TracChangeset for help on using the changeset viewer.