1. sfMySQLiDatabase.class.php
  2. /** * sfMySQLiDatabase provides connectivity for the MySQL brand database. * @see sfMySQLDatabase */
  3. class sfMySQLiDatabase extends sfMySQLDatabase
  4. {
  5. /**
  6. * Returns the appropriate connect method.
  7. *
  8. * @param bool $persistent Whether persistent connections are use or not
  9. * The MySQLi driver does not support persistent
  10. * connections so this argument is ignored.
  11. *
  12. * @return string name of connect method
  13. */
  14. protected function getConnectMethod($persistent)
  15. {
  16. return 'mysqli_connect';
  17. }
  18. /**
  19. * Selects the database to be used in this connection
  20. *
  21. * @param string $database Name of database to be connected
  22. *
  23. * @return bool true if this was successful
  24. */
  25. protected function selectDatabase($database)
  26. {
  27. return ($database != null && !@mysqli_select_db($this->connection, $database));
  28. }
  29. /**
  30. * Execute the shutdown procedure
  31. *
  32. * @throws <b>sfDatabaseException</b> If an error occurs while shutting down this database
  33. */
  34. public function shutdown()
  35. {
  36. if ($this->connection != null)
  37. {
  38. @mysqli_close($this->connection);
  39. }
  40. }
  41. }

Debug toolbar