- skip to content

# Database Abstraction Layer

### User Tools

- Login

### Site Tools

- Recent changes
- Media Manager
- Sitemap

### Sidebar

##### Resources

- Reference Manual
- User Guide
- The Data Dictionary
- ADOdb-xmlschema
- ADOdb Active Record
- Performance Monitoring
- Date/Time Library
- Session Management Library
- Unsupported Addons
- Coding Standards

##### Supported Databases

- Access
- ADO
- CSV
- Firebird
- Frontbase
- IBM DB2
- Informix
- Interbase
- LDAP
- Microsoft SQL Server
- MySQL
- Netezza
- ODBC
- ODBTP
- Oracle
- PDO
- Postgresql
- SAP ADS
- SAP ASE
- SAP Maxdb
- SAP Sqlanywhere
- Sqlite
- Sybase
- Plain Text
- Visual Foxpro

##### Other

- Feature Comparison Matrix
- Connection Matrix
- Include File Guide

v5:reference:adodb_getone_eof

# $ADODB_GETONE_EOF

Type | mixed
Default | null

This is a global variable that determines what the getOne() method returns if the SQL statement fails to match any records in a recordset. The value can be set or reset at any point in a script.

If the value that is being retrieved can return an empty or 0 value, it is important to do an exact comparison on the returned value to distinguish between queries where the value of the record found is empty and queries where no record is found

## Syntax

    /*
    *
    */
    $ADODB_GETONE_EOF = null;
    $test = $db->getOne('select character_field from table where integer_field=1');

    if ($test === null)
    {
        /*
        * We did not find any records that matched the value of integer_1=1
        */
    }
    if ($test == false)
    {
       /*
        * We did not find any records OR the first record found that matched integer_1=1
        * had a character_1 value of null
        */
    }

v5/reference/adodb_getone_eof.txt · Last modified: 2016/01/18 22:11 by 66.249.75.209

### Page Tools

- Show pagesource
- Old revisions
- Backlinks
- Rename Page
- Back to top