<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="http://adodb.org/dokuwiki/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://adodb.org/dokuwiki/feed.php">
        <title>ADOdb - v5:userguide:learn_abstraction</title>
        <description>Database Abstraction Layer for PHP</description>
        <link>http://adodb.org/dokuwiki/</link>
        <image rdf:resource="http://adodb.org/dokuwiki/lib/exe/fetch.php?media=logo.png" />
       <dc:date>2026-05-16T23:02:13+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:basic_query&amp;rev=1458048468&amp;do=diff"/>
                <rdf:li rdf:resource="http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:establishing_connection&amp;rev=1458059478&amp;do=diff"/>
                <rdf:li rdf:resource="http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:introduction&amp;rev=1458007425&amp;do=diff"/>
                <rdf:li rdf:resource="http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:key_value_pairs&amp;rev=1613911542&amp;do=diff"/>
                <rdf:li rdf:resource="http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:record_insertion&amp;rev=1458488918&amp;do=diff"/>
                <rdf:li rdf:resource="http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:start_lesson&amp;rev=1471095847&amp;do=diff"/>
                <rdf:li rdf:resource="http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:using_execute&amp;rev=1577963026&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://adodb.org/dokuwiki/lib/exe/fetch.php?media=logo.png">
        <title>ADOdb</title>
        <link>http://adodb.org/dokuwiki/</link>
        <url>http://adodb.org/dokuwiki/lib/exe/fetch.php?media=logo.png</url>
    </image>
    <item rdf:about="http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:basic_query&amp;rev=1458048468&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-03-15T13:27:48+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>A Basic Query</title>
        <link>http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:basic_query&amp;rev=1458048468&amp;do=diff</link>
        <description>Establishing A Connection Start Of Lesson Key/Value Pairs 


A Basic Query

The simplest way that ADOdb can retrieve data is through the 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.


$sql = &quot;select * from employees&quot;;
$array = $db-&gt;getAll($sql);

print_r($array);

/*
* Returns 
*/
0 =&gt; array(&#039;emp_no&#039; =&gt; 1000,
           &#039;emp_name&#039; =&gt; &#039;Joe Smith&#039;,
           &#039;hire_date&#039; =&gt; &#039;2014-01-12&#039;
  …</description>
    </item>
    <item rdf:about="http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:establishing_connection&amp;rev=1458059478&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-03-15T16:31:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Establishing A Connection</title>
        <link>http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:establishing_connection&amp;rev=1458059478&amp;do=diff</link>
        <description>Start Of Lesson Start Of Lesson A Basic Query 


Establishing A Connection

Before interacting with data, a connection needs to be first established to the database. The parameters required to connect to the database are the same as when using a direct PHP connection. For detailed information about connections, see</description>
    </item>
    <item rdf:about="http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:introduction&amp;rev=1458007425&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-03-15T02:03:45+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>The Database Abstraction Layer</title>
        <link>http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:introduction&amp;rev=1458007425&amp;do=diff</link>
        <description>The Database Abstraction Layer

This lesson shows the basic usage of the database abstraction layer


Other Guides

Reference Guide

Include File Guide

Writing Portable SQL

Migrating MySQL applications to ADOdb

Customizing Error Handling

Stored Procedure Example

Deprecated Functionality</description>
    </item>
    <item rdf:about="http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:key_value_pairs&amp;rev=1613911542&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-02-21T12:45:42+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Key/Value Pairs</title>
        <link>http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:key_value_pairs&amp;rev=1613911542&amp;do=diff</link>
        <description>A Basic Query Start Of Lesson Using The Execute Method 


Key/Value Pairs

An Associative Array

An often-used SQL construction is to read a table for a key/value pair. This can be used in creating Select Boxes, Radio groups etc. ADOdb contains a shortcut command getAssoc() to assist in the task.


$sql = &quot;select emp_no, emp_name from employees&quot;;

$array = $db-&gt;getAssoc($sql);

print_r($array);

/*
* Returns
*/
array(
1000 =&gt;&#039;Joe Smith&#039;,
1001 =&gt;&#039;Fred Jones&#039;
1002 =&gt; &#039;Arthur Dent&#039;
);</description>
    </item>
    <item rdf:about="http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:record_insertion&amp;rev=1458488918&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-03-20T15:48:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Inserting And Updating Records</title>
        <link>http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:record_insertion&amp;rev=1458488918&amp;do=diff</link>
        <description>Using Execute Start Of Lesson Inserting And Updating Records


Inserting And Updating Records

AutoExecute

ADOdb provides a helper routine, autoExecute(). It simplifies the task of inserting and updating records by providing a structured, easy to understand methodology.

Inserting A Record

In order to insert a record, it is sufficient to know:</description>
    </item>
    <item rdf:about="http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:start_lesson&amp;rev=1471095847&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-08-13T13:44:07+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Introduction</title>
        <link>http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:start_lesson&amp;rev=1471095847&amp;do=diff</link>
        <description>The Database Abstraction Layer Start Of Lesson Establishing A Connection 


Introduction

ADOdb is a Database Abstraction Layer that allows the writing of database independent SQL statements. It does this by placing a layer of generic statement execution code between the programmer and the PHP database-specific access commands. This allows the writing of portable SQL code that can access multiple databases. For example the following database specific statements:</description>
    </item>
    <item rdf:about="http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:using_execute&amp;rev=1577963026&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-01-02T11:03:46+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Using The Execute Method</title>
        <link>http://adodb.org/dokuwiki/doku.php?id=v5:userguide:learn_abstraction:using_execute&amp;rev=1577963026&amp;do=diff</link>
        <description>Key/Value Pairs Start Of Lesson Inserting And Updating Records


Using The Execute Method

The command execute() provides complete control over the reading and writing of the data in the database.

Reading Data

When used to read the data, the executed command returns a Query Result (or RecordSet), which can be accessed and used to read the records individually.</description>
    </item>
</rdf:RDF>
