ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:userguide:learn_abstraction:basic_query

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
v5:userguide:learn_abstraction:basic_query [2016/03/15 01:18] mnewnhamv5:userguide:learn_abstraction:basic_query [2016/03/15 01:23] mnewnham
Line 1: Line 1:
 <- v5:userguide:learn_abstraction:establishing_connection|Establishing A Connection ^ v5:userguide:learn_abstraction:start_lesson|Start Of Lesson ^ v5:userguide:learn_abstraction:key_value_pairs|Key/Value Pairs -> <- v5:userguide:learn_abstraction:establishing_connection|Establishing A Connection ^ v5:userguide:learn_abstraction:start_lesson|Start Of Lesson ^ v5:userguide:learn_abstraction:key_value_pairs|Key/Value Pairs ->
 +~~NOTOC~~
 ====== A Basic Query ====== ====== A Basic Query ======
 The simplest way that ADOdb can retrieve data is through the [[v5:reference:connection:getall|getAll()]] method. This method reads the selected rows from the database into an array. Once retrieved, the data in the recordset is inserted into an array. The simplest way that ADOdb can retrieve data is through the [[v5:reference:connection:getall|getAll()]] method. This method reads the selected rows from the database into an array. Once retrieved, the data in the recordset is inserted into an array.
Line 27: Line 27:
 </code> </code>
  
 +===== Changing How Data Is Returned =====
 The array can be returned in one of 3 ways: numeric, associative or mixed. The example above shows the returned data in associative format. In numeric format, the same array would look like this: The array can be returned in one of 3 ways: numeric, associative or mixed. The example above shows the returned data in associative format. In numeric format, the same array would look like this:
  
Line 46: Line 47:
 For more information on setting the returned data format, see [[v5:reference:adodb_fetch_mode|$ADODB_FETCH_MODE]] For more information on setting the returned data format, see [[v5:reference:adodb_fetch_mode|$ADODB_FETCH_MODE]]
  
-==== Similar Commands ====+===== Alternative Commands =====
 There are a number of similar commands that can be used as coding shortcuts. For an exhaustive list, see the [[v5:reference:index|Reference Manual]]. There are a number of similar commands that can be used as coding shortcuts. For an exhaustive list, see the [[v5:reference:index|Reference Manual]].
  
v5/userguide/learn_abstraction/basic_query.txt · Last modified: 2016/03/15 14:27 by mnewnham