I have a software using Visual Foxpro, so it's using dbf+cdx+fpt files to store all the data.
One of my projects was to collect all possible data from the software and show it on the web using PHP+HTML+CSS+Bootstrap.
I've been lucky doing this and the project looks amazing so far. But now I'm having a problem, and I wonder if you can help me.
All the data I need to show so far was on the .dbf file, but now I need to get data from .fpt file. The way I use to connect to on PHP doesn't allow me to show the data attached to fpt files, just data from dbf files.
I'm using the following structure so far to get this done:
- On a Windows Server, I have XAMPP installed and I created a ODBC Data Source of "Microsoft Visual FoxPro Driver" to the path of the software where all the dbf files are, and named that connection ConnectSofTo.
To connect to dbf tables I am using the following code on a PHP page (as example):
<?php $conn = odbc_connect("ConnectSofTo", "", "") or die ("Error: could not connect to database"); if (!$conn){exit("Connection Failed: " . $conn);} $sql=" SELECT movimentos.ORDEM, movimentos.DATA, movimentos.DOC, movimentos.COD_HASH FROM movcliente.dbf AS movimentos WHERE movimentos.DATA>={^2017-01-01} AND NOT movimentos.DOC='RCB' "; $rs=odbc_exec($conn,$sql); while(odbc_fetch_array($rs)){ echo odbc_result($rs,"ORDEM")." | ".odbc_result($rs,"COD_HASH")."</br>"; }?>
So, this code works fine, the problem is: the field COD_HASH it is a textfield with more than 70 random characters on it, and I need to show it on the web page.
This specific textfield is hosted on the fpt file, and I wonder if you know a way to show it on a php page.
Thank you for your attention in advance