Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
Steven Langfield: "I wanted to drop you a mail to say how freaking AMAZING your software is. It will be the best £100 I have ever spent. I have still to read all your documentation to take full advantage but what you have created is truly amazing".
Ran Cole: "We bought the tool last week and want to say how much we love it. We've found it not only powerful, but very user friendly. We have used the tool to create an interface that manages our MySQL DB for different types of users".

More

Add your opinion

PHP Generator for MySQL online Help

Prev Return to chapter overview Next

createConnection

Creates a new connection to the database. Returns an instance of the EngConnection class.

 

Signature:

function createConnection()

 

Example

The code snippet below shows how to add a record to a log table when a user resets his password.

 

$connection = createConnection();

 

$sqlTemplate =

    "INSERT INTO user_log (username, action_type, action_time) " .

     "VALUES ('%s', '%s', '%s')";               

 

$sql = sprintf($sqlTemplate, $username, 'password_reset_complete', date('Y-m-d H:i:s'));

 

$connection->Connect();

$connection->ExecSQL($sql);



Prev Return to chapter overview Next