Changeset 12763
- Timestamp:
- 11/08/08 12:27:24 (8 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.2/lib/database/sfMySQLDatabase.class.php
r9144 r12763 56 56 $password = $this->getParameter('password'); 57 57 $username = $this->getParameter('username'); 58 $encoding = $this->getParameter('encoding'); 58 59 59 60 break; … … 110 111 // can't select the database 111 112 throw new sfDatabaseException(sprintf('Failed to select MySQLDatabase "%s".', $database)); 113 } 114 115 // set encoding if specified 116 if($encoding) 117 { 118 @mysql_query("SET NAMES '".$encoding."'", $this->connection); 112 119 } 113 120 branches/1.2/lib/storage/sfDatabaseSessionStorage.class.php
r10590 r12763 100 100 $database = $this->options['database']; 101 101 102 // get the database resource 102 // get the database and connection 103 if(get_class($database) == 'sfPropelDatabase') 104 { 105 $this->db = Propel::getConnection(); 106 } 107 else 108 { 109 $this->db = $database->getResource(); 110 } 103 111 $this->db = $database->getResource(); 104 112 $this->con = $database->getConnection(); doc/branches/1.2/book/08-Inside-the-Model-Layer.txt
r12576 r12763 535 535 persistent: true # Use persistent connections 536 536 537 The permitted values of the `phptype` parameter are the ones of the database systems supported by Creole:537 The permitted values of the `phptype` parameter are the ones of the database systems supported by PDO: 538 538 539 539 * `mysql`

