|
Revision 23810, 1.4 kB
(checked in by Kris.Wallsmith, 4 years ago)
|
[1.3] set svn:eol-style property to native and svn:keywords property to Id on all .php files
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Id
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
class sfMySQLiDatabase extends sfMySQLDatabase |
|---|
| 17 |
{ |
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
* Returns the appropriate connect method. |
|---|
| 21 |
* |
|---|
| 22 |
* @param bool $persistent Whether persistent connections are use or not |
|---|
| 23 |
* The MySQLi driver does not support persistent |
|---|
| 24 |
* connections so this argument is ignored. |
|---|
| 25 |
* |
|---|
| 26 |
* @return string name of connect method |
|---|
| 27 |
*/ |
|---|
| 28 |
protected function getConnectMethod($persistent) |
|---|
| 29 |
{ |
|---|
| 30 |
return 'mysqli_connect'; |
|---|
| 31 |
} |
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
* Selects the database to be used in this connection |
|---|
| 35 |
* |
|---|
| 36 |
* @param string $database Name of database to be connected |
|---|
| 37 |
* |
|---|
| 38 |
* @return bool true if this was successful |
|---|
| 39 |
*/ |
|---|
| 40 |
protected function selectDatabase($database) |
|---|
| 41 |
{ |
|---|
| 42 |
return ($database != null && !@mysqli_select_db($this->connection, $database)); |
|---|
| 43 |
} |
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
* Execute the shutdown procedure |
|---|
| 47 |
* |
|---|
| 48 |
* @throws <b>sfDatabaseException</b> If an error occurs while shutting down this database |
|---|
| 49 |
*/ |
|---|
| 50 |
public function shutdown() |
|---|
| 51 |
{ |
|---|
| 52 |
if ($this->connection != null) |
|---|
| 53 |
{ |
|---|
| 54 |
@mysqli_close($this->connection); |
|---|
| 55 |
} |
|---|
| 56 |
} |
|---|
| 57 |
} |
|---|
| 58 |
|
|---|