# filePro PHP

filePro is a relational database by fP Technologies. There are versions for win32 and SCO UNIX. PHP only supports reading from filePro databases. To enable filePro functions dynamically, use the dl function to load the appropriate extension. You can also compile filePro support into the PHP module. Chad Robinson wrote the filePro extension.
boolean filepro(string directory)
The filepro function starts a connection to a map file. Information about the database is stored in memory and used by the other FilePro functions.

<?
filepro("/fp/store");
print("TABLE>");
//field names, type, width
print("TR> ");
for($col=1;$col = filepro_fieldcount(); $col++) { print("TH>"); print(filepro_fieldname($col));
print(" ");
print(filepro_fieldtype($col)); print(" "); print(filepro_fieldwidth($col));
print("/TH>");
}
print("/TR> ");
//loop over each row
for($row=1;$row = filepro_rowcount(); $row++) { print("TR> "); //output fields for($col=1; $col = filepro_fieldcount();$col++)
{
print("TD>");
print(filepro_retrieve($row,$col));
print("/TD>");
}
print("/TR> ");
}
print('/TABLE>');
?>

integer filepro_fieldcount()
Use filepro_fieldcount to find the number of fields. See the filepro example above.

string filepro_fieldname(integer field_number)
The filepro_fieldname function returns the name of the field for the given field number. See the filepro example above.

string filepro_fieldtype(integer field_number)
The filepro_fieldtype function returns the edit type for the given field number. See the filepro example above.

string filepro_retrieve(integer row, integer field)
The filepro_retrieve function returns the value for the specified field on the specified row. See the filepro example above.

integer filepro_rowcount()
Use filepro_rowcount to find the number of rows. See the filepro example above.

integer filepro_fieldwidth(integer field_number)
Use the filepro_fieldwidth function to find the width of the specified field. See the filepro example above.