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 ( get_last_error ) last_error Next Section ( error_dump ) >>
    Usage void last_error()
    Purpose To print the last error message
    Availability txtSQL >= 1.0.0

    This function will print the last error message that txtSQL issued

    Note- To retrieve the last error rather than print it, use get_last_error()

    Example 29: last_error() Copy to Clipboard
    <?php
    $sql
    ->strict(0);

    if ( !
    $sql->selectdb('testDb') )
    {
        
    $sql->last_error();
        die();
    }
    ?>

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