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

Subscribe to our news:
Partners
Testimonials
Jonathan Oakes: "This is a lovely application. It's easy to hook into my own bespoke applications. It's very powerful, yet really quite simple to use. Thanks for this".
David Lantz: "Thank you, this is by far the simplest, and most friendly utility for building db record system I have ever used. I wish I could get my systems guys at the office to purchase this for our company would be so very helpful and speed up a lot of work. I for one have used it for everything from a simple inventory record of my house, to a members record for my church just little pet projects and a test bed to test my own db builds and theories before having to hand code at the office..... it is a lot of fun to work with".

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