Hello,
Is it possible to connect to an ADS DBFCDX database via PHP? If so, does anyone have sample code they can provide?
Hello,
Is it possible to connect to an ADS DBFCDX database via PHP? If so, does anyone have sample code they can provide?
hey there friend
i work with PHP long time and php no is compatible with dbfcdx
u can use mysql or sqlite
i recoment mysql is more speed and easy to use
other alterenative is u use wepwap that u make urweb with how u make
progman with xharbour, in the really is a xharbour that u make a file page.exe "CGI" that make connection with dbf
thanks ![]()
//sample appending records to a dbf/ntx table:
if ( !DDconnect( _DATA_DICT, $rConn ) ) die( "<br> Error connecting to Database.<br>" ) ;
$rStmt = ads_prepare( $rConn, "INSERT INTO log ( [UserId], [login_date], [ip] ) VALUES( ?, now(), ? )" );
$aParms = array( 1 => $user, 2 => $_SERVER[ 'REMOTE_HOST' ].$_SERVER[ 'REMOTE_ADDR' ] );
$rResult = ads_execute( $rStmt, $aParms );
ads_close( $rConn );
//----------------------------------------------------------------------------------------------------------------------
function DDconnect( $db, &$rConn ) {
$user = $_SESSION[ 'userid' ];
$pass = $_SESSION[ 'password' ];
$rConn = ads_connect( $db, $user, $pass, SQL_CURSOR_DYNAMIC );
return is_resource( $rConn );
} $aParms= array( 1 => "[Save Command]:<".date("M-d-y h:m:sa").">\n".$_POST[ 'solution' ],
2 => $user,
3 => $_POST[ 'status' ] == "Open" ? FALSE :TRUE ,
4 => $case,
5 => $isTech );
$query = "UPDATE cases SET [Solution] = ?, [Solution_date] = now(),
[Tech] = ?, [Status] = ? WHERE [Case_no] = ? AND ? = TRUE" ;
$rStmt = ads_prepare( $rConn, $query );
$rResult = ads_execute( $rStmt, $aparms ) ; $query = "SELECT [comments], [time_stamp], [sequence] FROM ticket_feedback ".
"WHERE Case_no = ? ORDER BY [sequence]" ;
$rStmt = ads_prepare( $rConn, $query );
$aparms = array( 1 => $_GET[ 'case' ] );
$rResult = ads_execute( $rStmt, $aparms ) ;