📄 intro.dbase.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Introduction</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="book.dbase.html">dBase</a></div> <div class="next" style="text-align: right; float: right;"><a href="dbase.setup.html">Installing/Configuring</a></div> <div class="up"><a href="book.dbase.html">dBase</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="intro.dbase" class="preface"> <h1 class="title">Introduction</h1> <p class="para"> These functions allow you to access records stored in dBase-format (dbf) databases. </p> <p class="para"> dBase files are simple sequential files of fixed length records. Records are appended to the end of the file and delete records are kept until you call <a href="function.dbase-pack.html" class="function">dbase_pack()</a>. </p> <p class="para"> The types of dBase fields available are: <table border="5"> <caption><b>Available types of fields</b></caption> <colgroup> <thead valign="middle"> <tr valign="middle"> <th colspan="1">Field</th> <th colspan="1">dBase Type</th> <th colspan="1">Format</th> <th colspan="1">Additional information</th> </tr> </thead> <tbody valign="middle" class="tbody"> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><i>M</i></td> <td colspan="1" rowspan="1" align="left">Memo</td> <td colspan="1" rowspan="1" align="left">n/a</td> <td colspan="1" rowspan="1" align="left">This type is not supported by PHP, such field will be ignored</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><i>D</i></td> <td colspan="1" rowspan="1" align="left">Date</td> <td colspan="1" rowspan="1" align="left"><i>YYYYMMDD</i></td> <td colspan="1" rowspan="1" align="left">The field length is limited to 8</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><i>N</i></td> <td colspan="1" rowspan="1" align="left">Number</td> <td colspan="1" rowspan="1" align="left">A number</td> <td colspan="1" rowspan="1" align="left"> You must declare a length and a precision (the number of digits after the decimal point) </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><i>C</i></td> <td colspan="1" rowspan="1" align="left">String</td> <td colspan="1" rowspan="1" align="left">A string</td> <td colspan="1" rowspan="1" align="left">You must declare a length. When retrieving data, the string will be right-padded with spaces to fit the declared length.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><i>L</i></td> <td colspan="1" rowspan="1" align="left">Boolean</td> <td colspan="1" rowspan="1" align="left"><i>T</i> or <i>Y</i> for <b><tt>TRUE</tt></b>, <i>F</i> or <i>N</i> for <b><tt>FALSE</tt></b></td> <td colspan="1" rowspan="1" align="left">Stored and returned as an integer (1 or 0)</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><i>F</i></td> <td colspan="1" rowspan="1" align="left">Float</td> <td colspan="1" rowspan="1" align="left">A float number</td> <td colspan="1" rowspan="1" align="left">Support for this type of field was added in PHP 5.2.0</td> </tr> </tbody> </colgroup> </table> </p> <div class="warning"><b class="warning">Warning</b> <p class="para"> There is no support for indexes or memo fields. There is no support for locking, too. Two concurrent web server processes modifying the same dBase file will very likely ruin your database. </p> <p class="para"> We recommend that you do not use dBase files as your production database. Choose any real SQL server instead; <a href="http://www.mysql.com/" class="link external">» MySQL</a> or <a href="http://www.postgresql.org/" class="link external">» Postgres</a> are common choices with PHP. dBase support is here to allow you to import and export data to and from your web database, because the file format is commonly understood by Windows spreadsheets and organizers. </p> </div> </div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="book.dbase.html">dBase</a></div> <div class="next" style="text-align: right; float: right;"><a href="dbase.setup.html">Installing/Configuring</a></div> <div class="up"><a href="book.dbase.html">dBase</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -