|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-04-08 12:46 UTC] tom dot van dot schoor at gmail dot com
[2010-04-09 00:41 UTC] degeberg@php.net
[2010-04-09 00:41 UTC] degeberg@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: degeberg
[2010-04-09 00:41 UTC] degeberg@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 06:00:01 2026 UTC |
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); ?>