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

Subscribe to our news:
Partners
Testimonials
Ananda Theerthan J: "I have been looking for PHP generator for years and now I am happy that I found one. Yes, its the PHP generator for MySQL. I completely rate 10/10 for this product for making life easier. It has lot of features and capabilities especially the CRUD, lookups and data partitioning. I love this product and recommend to others".
Dionys Henzen: "Congratulations! Your MySQL PHP Generator is a great tool, that can save a lot of time and money to a developer! I'll evaluate for sure your software products when I need them. Great job".

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