Dotclear

Changeset 1743:a659700da036 for inc/core


Ignore:
Timestamp:
09/06/13 21:36:57 (12 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Add mysqli support, step 1, addresses #1450

Location:
inc/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • inc/core/class.dc.blog.php

    r1689 r1743  
    658658          if (!$rs->isEmpty()) 
    659659          { 
    660                if ($this->con->driver() == 'mysql') { 
     660               if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') { 
    661661                    $clause = "REGEXP '^".$this->con->escape($url)."[0-9]+$'"; 
    662662               } elseif ($this->con->driver() == 'pgsql') { 
     
    18281828          if (!$rs->isEmpty()) 
    18291829          { 
    1830                if ($this->con->driver() == 'mysql') { 
     1830               if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') { 
    18311831                    $clause = "REGEXP '^".$this->con->escape($url)."[0-9]+$'"; 
    18321832               } elseif ($this->con->driver() == 'pgsql') { 
     
    21872187           
    21882188          # mySQL uses "JOIN" synthax 
    2189           if ($this->con->driver() == 'mysql') { 
     2189          if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') { 
    21902190               $strReq .=  
    21912191                    'JOIN '.$this->prefix.'post tp ON tc.post_id = tp.post_id '; 
     
    21962196           
    21972197          # pgSQL uses "FROM" synthax 
    2198           if ($this->con->driver() != 'mysql') { 
     2198          if ($this->con->driver() != 'mysql' || $this->con->driver() == 'mysqli') { 
    21992199               $strReq .=  
    22002200                    'FROM '.$this->prefix.'post tp '; 
     
    22062206           
    22072207          # add pgSQL "WHERE" clause 
    2208           if ($this->con->driver() != 'mysql') { 
     2208          if ($this->con->driver() != 'mysql' || $this->con->driver() == 'mysqli') { 
    22092209               $strReq .=  
    22102210                    'AND tc.post_id = tp.post_id '; 
     
    22652265           
    22662266          # mySQL uses "INNER JOIN" synthax 
    2267           if ($this->con->driver() == 'mysql') { 
     2267          if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') { 
    22682268               $strReq =  
    22692269                    'DELETE FROM tc '. 
     
    23022302           
    23032303          # mySQL uses "INNER JOIN" synthax 
    2304           if ($this->con->driver() == 'mysql') { 
     2304          if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') { 
    23052305               $strReq =  
    23062306                    'DELETE FROM tc '. 
  • inc/core/class.dc.core.php

    r1698 r1743  
    6464          if ($this->con instanceof mysqlConnection) { 
    6565               mysqlConnection::$weak_locks = true; 
     66          } elseif ($this->con instanceof mysqliConnection) { 
     67               mysqliConnection::$weak_locks = true; 
    6668          } 
    6769           
Note: See TracChangeset for help on using the changeset viewer.

Sites map