Doc #51508 [Opn->Csd]: MySQL error
| From: | degeberg@php.net | Date: | Thu, 08 Apr 2010 22:41:41 +0000 |
| Subject: | Doc #51508 [Opn->Csd]: MySQL error | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-4175@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51508&edit=1
ID: 51508
Updated by: degeberg@php.net
Reported by: tom dot van dot schoor at gmail dot com
Summary: MySQL error
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: OSX
PHP Version: Irrelevant
-Assigned To:
+Assigned To: degeberg
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2010-04-09 00:41:24] degeberg@php.net
Automatic comment from SVN on behalf of degeberg
Revision: http://svn.php.net/viewvc/?view=revision&revision=297721
Log: Fixed PHP bug #51508, error in SQL example in mysql::commit() doc
page
------------------------------------------------------------------------
[2010-04-08 12:46:35] tom dot van dot schoor at gmail dot com
This is for the examples with mysqli::commit
And mysql version 5.0.41
------------------------------------------------------------------------
[2010-04-08 12:42:13] tom dot van dot schoor at gmail dot com
Description:
------------
The provided examples generate MySQL errors:
You have an error in your SQL syntax; check the manual that corresponds
to your
MySQL server version for the right syntax to use near 'Type=InnoDB' at
line 1
Test script:
---------------
<?php
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', '1');
$link = mysqli_connect("localhost", "world", "deadl1ne",
"world");
if (!$link) {
printf("Can't connect to localhost. Error: %s\n",
mysqli_connect_error());
exit();
}
/* set autocommit to off */
mysqli_autocommit($link, FALSE);
mysqli_query($link, "CREATE TABLE Language LIKE CountryLanguage
Type=InnoDB");
print mysqli_error($link);
/* Insert some values */
mysqli_query($link, "INSERT INTO Language VALUES ('DEU', 'Bavarian',
'F', 11.2)");
mysqli_query($link, "INSERT INTO Language VALUES ('DEU', 'Swabian',
'F',
9.4)");
/* commit transaction */
mysqli_commit($link);
/* close connection */
mysqli_close($link);
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51508&edit=1