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".
Steve Morton: "First let me thank you for making this application Free. Best deal I have ever see for what it does".

More

Add your opinion

PHP Generator for MySQL online Help

Prev Return to chapter overview Next

ExecQueryToArray

Еxecute a query that returns a result set.

 

Signature:

function ExecQueryToArray($sql, &$array)

 

Example:

$queryResult = array();

$sql = "SELECT first_name, last_name, email FROM customer WHERE active = 1";

$this->GetConnection()->ExecQueryToArray($sql, $queryResult);

 

foreach ($queryResult as $row) {

  $customerFirstName = $row['first_name']; // you can get the first name by key

  $customerFirstName = $row[0]; // or by index

   

  $customerLastName = $row['last_name']; // you can get the last name by key 

  $customerLastName = $row[1]; // or by index

  

  $customerEmail = $row['email']; // you can get the email by key 

  $customerEmail = $row[2]; // or by index

 



Prev Return to chapter overview Next