Home    Back    Forward    Refresh    txtSQL Homepage

get_last_error
Purpose: To get the last error message
txtSQL >= 1.0.0
string get_last_error()

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 Comments - get_last_error
No comments posted yet;
Last Page Next Page

'Language Reference'

User Functions

Database Functions

Data Manipulation Functions

Table Functions

Error Handling Functions
  • strict
  • get_last_error
  • last_error
  • error_dump

    SQL Syntax

  • [ txtSQL Documentation powered by txtSQL | 6 SQL Queries ]