Changeset 10 for trunk/class


Ignore:
Timestamp:
Jun 19, 2012, 8:56:06 AM (12 years ago)
Author:
maron
Message:

připojení do databáze

Location:
trunk/class
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/class/Database.php

    r8 r10  
    1919  {
    2020    $this->Config = new Config();
    21     $this->Database->HostName = $this->Config->Database['Host'];
    22     $this->Database->UserName = $this->Config->Database['User'];
    23     $this->Database->Password = $this->Config->Database['Password'];
    24     $this->Database->Schema = $this->Config->Database['Database'];
    25     $this->Database->Charset = $this->Config->Database['Charset'];
    26     $this->Database->ShowSQLQuery = $this->Config->Web['ShowSQLQuery'];
    27     $this->Database->ShowSQLError = $this->Config->Web['ShowSQLError'];
     21    $this->HostName = $this->Config->Database['Host'];
     22    $this->UserName = $this->Config->Database['User'];
     23    $this->Password = $this->Config->Database['Password'];
     24    $this->Schema = $this->Config->Database['Database'];
     25    $this->Charset = $this->Config->Database['Charset'];
     26    $this->ShowSQLQuery = $this->Config->Web['ShowSQLQuery'];
     27    $this->ShowSQLError = $this->Config->Web['ShowSQLError'];
    2828    $this->open();
    2929   
     
    3838  function query($Query)
    3939  {
    40  
    4140    if($this->ShowSQLQuery)
    4241    {
     42  echo $this->ShowSQLQuery;
    4343      if(isset($_SERVER['REMOTE_ADDR'])) echo('<div style="border-bottom-width: 1px; border-bottom-style: solid; padding-bottom: 3px; padding-top: 3px; font-size: 12px; font-family: Arial;">'.$Query.'</div>');
    4444      else echo($Query."\n");
Note: See TracChangeset for help on using the changeset viewer.