PHP connect DBF file update

| No Comments | No TrackBacks

I posted PHP connect DBF file with a sample. Now Pierre left the message and asked why error comes up.

I doing some tests and get the answer.

1) The database.dbf is reserved name.

2) The field name is always capital.

Let me give the better sample here.

require_once('odbc.php');

$strsql= 'SELECT * FROM dat.dbf';
$query = odbc_exec($odbc, $strsql) or die (odbc_errormsg());
while($row = odbc_fetch_array($query))
{
echo 'Client Name: '.$row['NAME'].'<br />';
echo 'Client Phone Number: '.$row['PHONE'].'<br />';
echo '<hr />';
}
odbc_close($odbc);


Related Articles

No TrackBacks

TrackBack URL: http://www.yinfor.com/mtcgi/mt-t-1010.cgi/2087

Leave a comment

About this Entry

This page contains a single entry by David Yin published on February 27, 2008 4:45 PM.

2008 RRSP tips for Canadian was the previous entry in this blog.

Replac the fan of power supply unit is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.21-en

Online Tools