get_last_error Back | Forward | Home

'Language Reference'

User Functions

Database Functions

Data Manipulation Functions

Table Functions

Error Handling Functions
  • strict

  • get_last_error

  • last_error

  • error_dump


  • << Last Section ( strict ) get_last_error Next Section ( last_error ) >>
    Usage string get_last_error()
    Purpose To get the last error message
    Availability txtSQL >= 1.0.0

    This function will retrieve the last error message that txtSQL issued

    Note- To print the last warning rather than retrieving it, use last_error()

    Example 28: get_last_error() Copy to Clipboard
    <?php
    $sql
    ->strict(0);
    if ( !
    $sql->selectdb('testDb') )
    {
        die(
    'An error occurred while selected database "testDb", txtSQL said: '.$sql->get_last_error());
    }
    ?>

    User-Contributed Comments for:
    get_last_error()
    No comments found;