PHP Database ODBC

PHP Database ODBC tutorial will explain you How to access to a databases that have acquired the semantics of the ODBC API to execute their own particular API. The Unified ODBC functions in PHP allow you to gain access to a databases that have acquired the semantics of the ODBC API to execute their own particular API.

Creating A ODBC Data Source Name (DSN)

After you have guaranteed that the ODBC driver for your database is installed, you normally need to make a Data Source Name (DSN), which holds all the  connection details needed to login.

Connecting to ODBC

PHP odbc_connect() function is utilized to connect with an ODBC data source. The function takes four parameters: the information source name, username, password, and a optional cursor type.

Example on Connecting to ODBC

PHP odbc_fetch_row()

PHP odbc_fetch_row() capacity is utilized to return records from the result set. PHP odbc_fetch_row() function returns true if it has the ability to return rows, otherwise false.

Syntax for PHP odbc_fetch_row()

Example on PHP odbc_fetch_row()

Closing an ODBC Connection – PHP odbc_close()

PHP odbc_close() function is used to close an ODBC connection.

Syntax for PHP odbc_close()

Example on PHP odbc_close()

SHARE
Previous articlePHP MySql Delete
Next articlePHP Database
I am a young Information Systems Security Engineer(CEH). I had started with penetration testing when i am 17 years old. It all started with Kali linux and Metasploit.In free time i will play with Security holes/Bug bounty/Pentesting and Hacking !!!