mysqli_utility.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  2. /**
  3. * CodeIgniter
  4. *
  5. * An open source application development framework for PHP 5.1.6 or newer
  6. *
  7. * @package CodeIgniter
  8. * @author ExpressionEngine Dev Team
  9. * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
  10. * @license http://codeigniter.com/user_guide/license.html
  11. * @link http://codeigniter.com
  12. * @since Version 1.0
  13. * @filesource
  14. */
  15. // ------------------------------------------------------------------------
  16. /**
  17. * MySQLi Utility Class
  18. *
  19. * @category Database
  20. * @author ExpressionEngine Dev Team
  21. * @link http://codeigniter.com/user_guide/database/
  22. */
  23. class CI_DB_mysqli_utility extends CI_DB_utility {
  24. /**
  25. * List databases
  26. *
  27. * @access private
  28. * @return bool
  29. */
  30. function _list_databases()
  31. {
  32. return "SHOW DATABASES";
  33. }
  34. // --------------------------------------------------------------------
  35. /**
  36. * Optimize table query
  37. *
  38. * Generates a platform-specific query so that a table can be optimized
  39. *
  40. * @access private
  41. * @param string the table name
  42. * @return object
  43. */
  44. function _optimize_table($table)
  45. {
  46. return "OPTIMIZE TABLE ".$this->db->_escape_identifiers($table);
  47. }
  48. // --------------------------------------------------------------------
  49. /**
  50. * Repair table query
  51. *
  52. * Generates a platform-specific query so that a table can be repaired
  53. *
  54. * @access private
  55. * @param string the table name
  56. * @return object
  57. */
  58. function _repair_table($table)
  59. {
  60. return "REPAIR TABLE ".$this->db->_escape_identifiers($table);
  61. }
  62. // --------------------------------------------------------------------
  63. /**
  64. * MySQLi Export
  65. *
  66. * @access private
  67. * @param array Preferences
  68. * @return mixed
  69. */
  70. function _backup($params = array())
  71. {
  72. // Currently unsupported
  73. return $this->db->display_error('db_unsuported_feature');
  74. }
  75. }
  76. /* End of file mysqli_utility.php */
  77. /* Location: ./system/database/drivers/mysqli/mysqli_utility.php */