ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:getone

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
v5:reference:getone [2016/01/13 02:30] – ↷ Page moved from reference:getone to v5:reference:getone mnewnhamv5:reference:connection:getone [2021/03/11 20:15] (current) – [getOne] syntax: Added missing $bindvars param dregad
Line 1: Line 1:
-====== GetOne =====+====== getOne =====
 ~~NOTOC~~ ~~NOTOC~~
  
Line 5: Line 5:
 == Syntax == == Syntax ==
     mixed getOne(     mixed getOne(
-       string $sql+       string $sql
 +       optional string[] $bindvars
        )        )
  
 </WRAP> </WRAP>
    
-Executes the SQL and returns the first column of the first row. The recordset and remaining rows are discarded for you automatically. If an error occurs, either false or null is returned depending on the value of [[reference:$ADODB_GETONE_EOF]]. +Executes the SQL and returns the first column of the first row. The recordset and remaining rows are discarded for you automatically. If an error occurs, either false or null is returned depending on the value of [[v5:reference:adodb_getone_eof]]. 
  
-You can use [[reference:errormsg|errorMsg()]] to get any the error details. +You can use [[v5:reference:errormsg|errorMsg()]] to get any the error details. 
  
 ===== Controlling the response if no records are found ===== ===== Controlling the response if no records are found =====
v5/reference/connection/getone.1452648658.txt.gz · Last modified: 2017/04/21 11:34 (external edit)