I am accessing a VFP database in php using visual fox pro OLE DB Provider (vfpoledb.dll). I want to prepare statements for queries I am going to make in the same (or similar) way you would if you where using PDO or some other database abstraction layer.
Does anyone know if you can and the best way to prepare a statement so as to avoid injection attacks?
$conn = new COM("ADODB.Connection");
$conn->Open('Provider=VFPOLEDB.1;Data Source="' . $path . '";');
// Bad!
$up = $conn->Execute("UPDATE tablename SET fieldname='Testing' WHERE fieldname = '" . $value . "'")
// Good?
...
or/and if anyone knows where there is a reference to methods accessible though this COM dll that would be fantastic.
Just an update for anyone who walks this path in future days.
I ended up solving this problem using the ADOdb Database Abstraction Library for PHP http://adodb.sourceforge.net/
An example: