Oracle 5.0 Reference Manual page 2443

Table of Contents

Advertisement

echo "Input:\n";
mysqli_set_local_infile_handler($db, "callme");
mysqli_query($db, "LOAD DATA LOCAL INFILE 'input.txt' INTO TABLE t1");
mysqli_set_local_infile_default($db);
$res = mysqli_query($db, "SELECT * FROM t1");
echo "\nResult:\n";
while ($row = mysqli_fetch_assoc($res)) {
echo join(",", $row)."\n";
}
?>
The above examples will output:
Input:
23,foo
42,bar
Output:
23,FOO
42,BAR
See Also
mysqli_set_local_infile_default
20.7.3.9.52. mysqli::$sqlstate,
Copyright 1997-2012 the PHP Documentation Group. [2230]
mysqli::$sqlstate
mysqli_sqlstate
Returns the SQLSTATE error from previous MySQL operation
Description
Object oriented style
string
mysqli->sqlstate ;
Procedural style
string mysqli_sqlstate(
mysqli link);
Returns a string containing the SQLSTATE error code for the last error. The error code consists of five
characters.
'00000'
possible values, see http://dev.mysql.com/doc/mysql/en/error-handling.html.
MySQL Improved Extension (Mysqli)
mysqli_sqlstate
means no error. The values are specified by ANSI SQL and ODBC. For a list of
Note
Note that not all MySQL errors are yet mapped to SQLSTATE's. The value
(general error) is used for unmapped errors.
HY000
2423

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Mysql 5.0

Table of Contents