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

Subscribe to our news:
Partners
Testimonials
Svetlio Mitev: "I am really sure that you guys can make the best PHP code generators to be found worldwide".
Johnson Sieu: "Your PHP Generator is the BEST that I have used so far. It is affordable and user-friendly. Congratulation for coming up with such a fine product. I will not hesitate to introduce it to my peers".

More

Add your opinion

SQLite PHP Generator 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