admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
| 2 | <html>
|
| 3 | <head>
|
| 4 |
|
| 5 | <title>Code Igniter User Guide</title>
|
| 6 |
|
| 7 | <style type='text/css' media='all'>@import url('../userguide.css');</style>
|
| 8 | <link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
|
| 9 |
|
admin | 17a890d | 2006-09-27 20:42:42 +0000 | [diff] [blame] | 10 | <script type="text/javascript" src="../nav/nav.js"></script>
|
admin | 2296fc3 | 2006-09-27 21:07:02 +0000 | [diff] [blame] | 11 | <script type="text/javascript" src="../nav/prototype.lite.js"></script>
|
admin | 17a890d | 2006-09-27 20:42:42 +0000 | [diff] [blame] | 12 | <script type="text/javascript" src="../nav/moo.fx.js"></script>
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 13 | <script type="text/javascript">
|
| 14 | window.onload = function() {
|
| 15 | myHeight = new fx.Height('nav', {duration: 400});
|
| 16 | myHeight.hide();
|
| 17 | }
|
| 18 | </script>
|
| 19 |
|
| 20 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
| 21 | <meta http-equiv='expires' content='-1' />
|
| 22 | <meta http-equiv= 'pragma' content='no-cache' />
|
| 23 | <meta name='robots' content='all' />
|
| 24 | <meta name='author' content='Rick Ellis' />
|
| 25 | <meta name='description' content='Code Igniter User Guide' />
|
| 26 |
|
| 27 | </head>
|
| 28 | <body>
|
| 29 |
|
| 30 | <!-- START NAVIGATION -->
|
| 31 | <div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
|
| 32 | <div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
|
| 33 | <div id="masthead">
|
| 34 | <table cellpadding="0" cellspacing="0" border="0" style="width:100%">
|
| 35 | <tr>
|
admin | 10c3f41 | 2006-10-08 07:21:12 +0000 | [diff] [blame] | 36 | <td><h1>Code Igniter User Guide Version 1.5.0b1</h1></td>
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 37 | <td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
|
| 38 | </tr>
|
| 39 | </table>
|
| 40 | </div>
|
| 41 | <!-- END NAVIGATION -->
|
| 42 |
|
| 43 |
|
| 44 | <!-- START BREADCRUMB -->
|
| 45 | <table cellpadding="0" cellspacing="0" border="0" style="width:100%">
|
| 46 | <tr>
|
| 47 | <td id="breadcrumb">
|
| 48 | <a href="http://www.codeigniter.com/">Code Igniter Home</a> ›
|
| 49 | <a href="../index.html">User Guide Home</a> ›
|
| 50 | <a href="index.html">Database Library</a> ›
|
admin | 24dd7e7 | 2006-10-01 19:02:29 +0000 | [diff] [blame] | 51 | Database Utility Class
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 52 | </td>
|
| 53 | <td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td>
|
| 54 | </tr>
|
| 55 | </table>
|
| 56 | <!-- END BREADCRUMB -->
|
| 57 |
|
| 58 |
|
| 59 | <br clear="all" />
|
| 60 |
|
| 61 |
|
| 62 | <!-- START CONTENT -->
|
| 63 | <div id="content">
|
| 64 |
|
admin | 24dd7e7 | 2006-10-01 19:02:29 +0000 | [diff] [blame] | 65 | <h1>Database Utility Class</h1>
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 66 |
|
admin | 24dd7e7 | 2006-10-01 19:02:29 +0000 | [diff] [blame] | 67 | <p>The Database Utility Class contains functions that help you manage your database.</p>
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 68 |
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 69 | <h3>Table of Contents</h3>
|
| 70 |
|
| 71 | <ul>
|
admin | 24dd7e7 | 2006-10-01 19:02:29 +0000 | [diff] [blame] | 72 | <li><a href="#init">Initializing the Utility Class</a></li>
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 73 | <li><a href="#create">Creating a Database</a></li>
|
| 74 | <li><a href="#drop">Dropping a Database</a></li>
|
| 75 | <li><a href="#list">Listing your Databases</a></li>
|
| 76 | <li><a href="#opttb">Optimizing your Tables</a></li>
|
| 77 | <li><a href="#repair">Repairing your Databases</a></li>
|
| 78 | <li><a href="#optdb">Optimizing your Database</a></li>
|
admin | 24dd7e7 | 2006-10-01 19:02:29 +0000 | [diff] [blame] | 79 | <li><a href="#csv">CSV Files from a Database Result</a></li>
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 80 | <li><a href="#xml">XML Files from a Database Result</a></li>
|
| 81 | <li><a href="#backup">Backing up your Database</a></li>
|
| 82 | </ul>
|
| 83 |
|
| 84 |
|
| 85 | <a name="init"></a>
|
admin | 24dd7e7 | 2006-10-01 19:02:29 +0000 | [diff] [blame] | 86 | <h2>Initializing the Utility Class</h2>
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 87 |
|
admin | fd2750b | 2006-10-06 17:29:12 +0000 | [diff] [blame] | 88 | <p class="important"><strong>Important:</strong> In order to initialize the Utility class, your database driver must
|
| 89 | already be running, since the utilities class is loaded from within the main DB class.</p>
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 90 |
|
admin | fd2750b | 2006-10-06 17:29:12 +0000 | [diff] [blame] | 91 | <p>Load the Utility Class as follows:</p>
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 92 |
|
admin | fd2750b | 2006-10-06 17:29:12 +0000 | [diff] [blame] | 93 | <code>$this->db->load_utilities()</code>
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 94 |
|
| 95 | <p>Once initialized you will access the functions using the <dfn>$this->dbutil</dfn> object:</p>
|
| 96 |
|
| 97 | <code>$this->dbutil->some_function()</code>
|
| 98 |
|
| 99 |
|
| 100 |
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 101 | <a name="create"></a>
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 102 | <h2>$this->dbutil->create_database('db_name')</h2>
|
| 103 |
|
| 104 | <p>Permits you to create a database using the name specified in the first parameter. Returns TRUE/FALSE based on success or failure:</p>
|
| 105 |
|
| 106 | <code>if ($this->dbutil->create_database('my_db'))<br />
|
| 107 | {<br />
|
| 108 | echo 'Database created!';<br />
|
| 109 | }</code>
|
| 110 |
|
| 111 |
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 112 |
|
| 113 | <a name="drop"></a>
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 114 | <h2>$this->dbutil->drop_database('table_name')</h2>
|
| 115 |
|
| 116 | <p>Permits you to drop a database using the table name specified in the first parameter. Returns TRUE/FALSE based on success or failure:</p>
|
| 117 |
|
| 118 | <code>if ($this->dbutil->drop_database('my_db'))<br />
|
| 119 | {<br />
|
| 120 | echo 'Database deleted!';<br />
|
| 121 | }</code>
|
| 122 |
|
| 123 |
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 124 | <a name="list"></a>
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 125 | <h2>$this->dbutil->list_databases()</h2>
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 126 | <p>Returns an array of database names:</p>
|
| 127 |
|
| 128 |
|
| 129 | <code>
|
| 130 | $dbs = $this->dbutil->list_databases();<br />
|
| 131 | <br />
|
| 132 | foreach($dbs as $db)<br />
|
| 133 | {<br />
|
| 134 | echo $db;<br />
|
| 135 | }</code>
|
| 136 |
|
| 137 |
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 138 | <a name="opttb"></a>
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 139 | <h2>$this->dbutil->optimize_table('table_name');</h2>
|
| 140 |
|
admin | f66de86 | 2006-10-10 23:30:04 +0000 | [diff] [blame] | 141 | <p class="important"><strong>Note:</strong> This features is only available for MySQL/MySQLi databases.</p>
|
| 142 |
|
| 143 |
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 144 | <p>Permits you to optimize a table using the table name specified in the first parameter. Returns TRUE/FALSE based on success or failure:</p>
|
| 145 |
|
| 146 | <code>
|
| 147 | if ($this->dbutil->optimize_table('table_name'))<br />
|
| 148 | {<br />
|
admin | f66de86 | 2006-10-10 23:30:04 +0000 | [diff] [blame] | 149 | echo 'Success!';<br />
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 150 | }
|
| 151 | </code>
|
| 152 |
|
| 153 | <p><strong>Note:</strong> Not all database platforms support table optimization.</p>
|
| 154 |
|
| 155 |
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 156 | <a name="repair"></a>
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 157 | <h2>$this->dbutil->repair_table('table_name');</h2>
|
| 158 |
|
admin | f66de86 | 2006-10-10 23:30:04 +0000 | [diff] [blame] | 159 | <p class="important"><strong>Note:</strong> This features is only available for MySQL/MySQLi databases.</p>
|
| 160 |
|
| 161 |
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 162 | <p>Permits you to repair a table using the table name specified in the first parameter. Returns TRUE/FALSE based on success or failure:</p>
|
| 163 |
|
| 164 | <code>
|
| 165 | if ($this->dbutil->optimize_table('table_name'))<br />
|
| 166 | {<br />
|
admin | f66de86 | 2006-10-10 23:30:04 +0000 | [diff] [blame] | 167 | echo 'Success!';<br />
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 168 | }
|
| 169 | </code>
|
| 170 |
|
| 171 | <p><strong>Note:</strong> Not all database platforms support table repairs.</p>
|
| 172 |
|
| 173 |
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 174 | <a name="optdb"></a>
|
admin | e5bb936 | 2006-09-27 00:31:22 +0000 | [diff] [blame] | 175 | <h2>$this->dbutil->optimize_database();</h2>
|
| 176 |
|
admin | f66de86 | 2006-10-10 23:30:04 +0000 | [diff] [blame] | 177 | <p class="important"><strong>Note:</strong> This features is only available for MySQL/MySQLi databases.</p>
|
| 178 |
|
admin | e5bb936 | 2006-09-27 00:31:22 +0000 | [diff] [blame] | 179 | <p>Permits you to optimize the database your DB class is currently connected to. Returns an array containing the returned status messages or FALSE on failure.</p>
|
| 180 |
|
| 181 | <code>
|
admin | f66de86 | 2006-10-10 23:30:04 +0000 | [diff] [blame] | 182 | $result = $this->dbutil->optimize_database();<br />
|
admin | e5bb936 | 2006-09-27 00:31:22 +0000 | [diff] [blame] | 183 | <br />
|
| 184 | if ($result !== FALSE)<br />
|
| 185 | {<br />
|
| 186 | print_r($result);<br />
|
| 187 | }
|
| 188 | </code>
|
| 189 |
|
| 190 | <p><strong>Note:</strong> Not all database platforms support table optimization.</p>
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 191 |
|
| 192 |
|
admin | 24dd7e7 | 2006-10-01 19:02:29 +0000 | [diff] [blame] | 193 | <a name="csv"></a>
|
| 194 | <h2>$this->dbutil->csv_from_result($db_result)</h2>
|
admin | 3ed8c51 | 2006-09-29 23:26:28 +0000 | [diff] [blame] | 195 |
|
admin | 24dd7e7 | 2006-10-01 19:02:29 +0000 | [diff] [blame] | 196 | <p>Permits you to generate a CSV file from a query result. The first parameter of the function must contain the result object from your query.
|
admin | 3ed8c51 | 2006-09-29 23:26:28 +0000 | [diff] [blame] | 197 | Example:</p>
|
| 198 |
|
| 199 | <code>
|
| 200 | $this->load->dbutil();<br />
|
| 201 | <br />
|
| 202 | $query = $this->db->query("SELECT * FROM mytable");<br />
|
| 203 | <br />
|
admin | 24dd7e7 | 2006-10-01 19:02:29 +0000 | [diff] [blame] | 204 | echo $this->dbutil->csv_from_result($query);
|
admin | 3ed8c51 | 2006-09-29 23:26:28 +0000 | [diff] [blame] | 205 | </code>
|
| 206 |
|
| 207 | <p>The second and third parameters allows you to
|
| 208 | set the delimiter and newline character. By default tabs are used as the delimiter and "\n" is used as a new line. Example:
|
| 209 |
|
| 210 | <code>
|
| 211 | $delimiter = ",";<br />
|
| 212 | $newline = "\r\n";<br />
|
| 213 | <br />
|
admin | 24dd7e7 | 2006-10-01 19:02:29 +0000 | [diff] [blame] | 214 | echo $this->dbutil->csv_from_result($query, $delimiter, $newline);
|
admin | 3ed8c51 | 2006-09-29 23:26:28 +0000 | [diff] [blame] | 215 | </code>
|
| 216 |
|
admin | f66de86 | 2006-10-10 23:30:04 +0000 | [diff] [blame] | 217 | <p><strong>Important:</strong> This function will NOT write the CSV file for you. It simply creates the CSV layout.
|
admin | 3ed8c51 | 2006-09-29 23:26:28 +0000 | [diff] [blame] | 218 | If you need to write the file use the <a href="../helpers/file_helper.html">File Helper</a>.</p>
|
| 219 |
|
| 220 |
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 221 | <a name="xml"></a>
|
admin | 3ed8c51 | 2006-09-29 23:26:28 +0000 | [diff] [blame] | 222 | <h2>$this->dbutil->xml_from_result($db_result)</h2>
|
| 223 |
|
| 224 | <p>Permits you to generate an XML file from a query result. The first parameter expects a query result object, the second
|
| 225 | may contain an optional array of config parameters. Example:</p>
|
| 226 |
|
| 227 | <code>
|
| 228 | $this->load->dbutil();<br />
|
| 229 | <br />
|
| 230 | $query = $this->db->query("SELECT * FROM mytable");<br />
|
| 231 | <br />
|
| 232 | $config = array (<br />
|
| 233 | 'root' => 'root',<br />
|
| 234 | 'element' => 'element', <br />
|
| 235 | 'newline' => "\n", <br />
|
admin | c5f7fa3 | 2006-10-06 02:10:23 +0000 | [diff] [blame] | 236 | 'tab' => "\t"<br />
|
admin | 3ed8c51 | 2006-09-29 23:26:28 +0000 | [diff] [blame] | 237 | );<br />
|
| 238 | <br />
|
admin | 24dd7e7 | 2006-10-01 19:02:29 +0000 | [diff] [blame] | 239 | echo $this->dbutil->xml_from_result($query, $config);
|
admin | 3ed8c51 | 2006-09-29 23:26:28 +0000 | [diff] [blame] | 240 | </code>
|
| 241 |
|
admin | f66de86 | 2006-10-10 23:30:04 +0000 | [diff] [blame] | 242 | <p><strong>Important:</strong> This function will NOT write the XML file for you. It simply creates the XML layout.
|
admin | 3ed8c51 | 2006-09-29 23:26:28 +0000 | [diff] [blame] | 243 | If you need to write the file use the <a href="../helpers/file_helper.html">File Helper</a>.</p>
|
| 244 |
|
| 245 |
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 246 | <a name="backup"></a>
|
| 247 | <h2>$this->dbutil->backup()</h2>
|
admin | 3dd978f | 2006-09-30 19:24:45 +0000 | [diff] [blame] | 248 |
|
admin | e856ff4 | 2006-10-02 02:38:30 +0000 | [diff] [blame] | 249 | <p>Permits you to backup your full database or individual tables. The backup data can be compressed in either Zip or Gzip format.</p>
|
admin | 0e42554 | 2006-10-01 03:37:43 +0000 | [diff] [blame] | 250 |
|
admin | f66de86 | 2006-10-10 23:30:04 +0000 | [diff] [blame] | 251 | <p class="important"><strong>Note:</strong> This features is only available for MySQL/MySQLi databases.</p>
|
| 252 |
|
admin | 0e42554 | 2006-10-01 03:37:43 +0000 | [diff] [blame] | 253 | <p>Note: Due to the limited execution time and memory available to PHP, backing up very large
|
| 254 | databases may not be possible. If your database is very large you might need to backup directly from your SQL server
|
| 255 | via the command line, or have your server admin do it for you if you do not have root privileges.</p>
|
| 256 |
|
admin | e856ff4 | 2006-10-02 02:38:30 +0000 | [diff] [blame] | 257 | <h3>Usage Example</h3>
|
admin | 3ed8c51 | 2006-09-29 23:26:28 +0000 | [diff] [blame] | 258 |
|
admin | e856ff4 | 2006-10-02 02:38:30 +0000 | [diff] [blame] | 259 | <code>
|
| 260 | <dfn>// Load the DB utility class</dfn><br />
|
| 261 | $this->load->dbutil();<br /><br />
|
| 262 |
|
admin | c5f7fa3 | 2006-10-06 02:10:23 +0000 | [diff] [blame] | 263 | <dfn>// Backup your entire database and assign it to a variable</dfn><br />
|
admin | e856ff4 | 2006-10-02 02:38:30 +0000 | [diff] [blame] | 264 | $backup =& $this->dbutil->backup();
|
| 265 |
|
| 266 | <br /><br />
|
| 267 | <dfn>// Load the file helper and write the file to your server</dfn><br />
|
| 268 | $this->load->helper('file');<br />
|
| 269 | write_file('/path/to/mybackup.gz', $backup);
|
| 270 |
|
| 271 | <br /><br />
|
| 272 | <dfn>// Load the download helper and send the file to your desktop</dfn><br />
|
| 273 | $this->load->helper('download');<br />
|
| 274 | force_download('mybackup.gz', $backup);
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 275 | </code>
|
admin | 3ed8c51 | 2006-09-29 23:26:28 +0000 | [diff] [blame] | 276 |
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 277 | <h3>Setting Backup Preferences</h3>
|
| 278 |
|
admin | e856ff4 | 2006-10-02 02:38:30 +0000 | [diff] [blame] | 279 | <p>Backup preferences are set by submitting an array of values to the first parameter of the backup function. Example:</p>
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 280 |
|
| 281 | <code>$prefs = array(<br />
|
| 282 | 'tables' => array('table1', 'table2'), // Array of tables to backup.<br />
|
admin | e856ff4 | 2006-10-02 02:38:30 +0000 | [diff] [blame] | 283 | 'ignore' => array(), // List of tables to omit from the backup<br />
|
| 284 | 'format' => 'txt', // gzip, zip, txt<br />
|
| 285 | 'filename' => 'mybackup.sql', // File name - NEEDED ONLY WITH ZIP FILES<br />
|
| 286 | 'add_drop' => TRUE, // Whether to add DROP TABLE statements to backup file<br />
|
| 287 | 'add_insert' => TRUE, // Whether to add INSERT data to backup file<br />
|
| 288 | 'newline' => "\n" // Newline character used in backup file<br />
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 289 | );<br />
|
| 290 | <br />
|
| 291 | $this->dbutil->backup($prefs);
|
| 292 | </code>
|
| 293 |
|
admin | 0e42554 | 2006-10-01 03:37:43 +0000 | [diff] [blame] | 294 |
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 295 | <h3>Description of Backup Preferences</h3>
|
| 296 |
|
| 297 | <table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder">
|
| 298 | <tr>
|
| 299 | <th>Preference</th>
|
| 300 | <th>Default Value</th>
|
| 301 | <th>Options</th>
|
| 302 | <th>Description</th>
|
| 303 | </tr><tr>
|
admin | e856ff4 | 2006-10-02 02:38:30 +0000 | [diff] [blame] | 304 | <td class="td"><strong>tables</strong></td><td class="td">empty array</td><td class="td">None</td><td class="td">An array of tables you want backed up. If left blank all tables will be exported.</td>
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 305 | </tr><tr>
|
admin | e856ff4 | 2006-10-02 02:38:30 +0000 | [diff] [blame] | 306 | <td class="td"><strong>ignore</strong></td><td class="td">empty array</td><td class="td">None</td><td class="td">An array of tables you want the backup routine to ignore.</td>
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 307 | </tr><tr>
|
| 308 | <td class="td"><strong>format</strong></td><td class="td">gzip</td><td class="td">gzip, zip, txt</td><td class="td">The file format of the export file.</td>
|
| 309 | </tr><tr>
|
admin | e856ff4 | 2006-10-02 02:38:30 +0000 | [diff] [blame] | 310 | <td class="td"><strong>filename</strong></td><td class="td">the current date/time</td><td class="td">None</td><td class="td">The name of the backed-up file. The name is needed only if you are using zip compression.</td>
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 311 | </tr><tr>
|
| 312 | <td class="td"><strong>add_drop</strong></td><td class="td">TRUE</td><td class="td">TRUE/FALSE</td><td class="td">Whether to include DROP TABLE statements in your SQL export file.</td>
|
| 313 | </tr><tr>
|
admin | 4003718 | 2006-10-11 19:16:58 +0000 | [diff] [blame] | 314 | <td class="td"><strong>add_insert</strong></td><td class="td">TRUE</td><td class="td">TRUE/FALSE</td><td class="td">Whether to include INSERT statements in your SQL export file.</td>
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 315 | </tr><tr>
|
admin | 4003718 | 2006-10-11 19:16:58 +0000 | [diff] [blame] | 316 | <td class="td"><strong>newline</strong></td><td class="td">"\n"</td><td class="td">"\n", "\r", "\r\n"</td><td class="td">Type of newline to use in your SQL export file.</td>
|
admin | 32cb0e5 | 2006-09-30 20:36:59 +0000 | [diff] [blame] | 317 |
|
| 318 | </tr>
|
| 319 | </table>
|
| 320 |
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 321 |
|
| 322 | </div>
|
| 323 | <!-- END CONTENT -->
|
| 324 |
|
| 325 |
|
| 326 | <div id="footer">
|
| 327 | <p>
|
| 328 | Previous Topic: <a href="call_function.html">Custom Function Calls</a>
|
| 329 | ·
|
| 330 | <a href="#top">Top of Page</a> ·
|
| 331 | <a href="../index.html">User Guide Home</a> ·
|
admin | 3ed8c51 | 2006-09-29 23:26:28 +0000 | [diff] [blame] | 332 | Next Topic: <a href="caching.html">Database Caching Class</a>
|
admin | 3b60ae4 | 2006-09-25 23:26:03 +0000 | [diff] [blame] | 333 | <p>
|
| 334 | <p><a href="http://www.codeigniter.com">Code Igniter</a> · Copyright © 2006 · <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
|
| 335 | </div>
|
| 336 |
|
| 337 | </body>
|
| 338 | </html> |