Doc #51508 [Opn]: MySQL error

From: Date: Thu, 08 Apr 2010 10:46:36 +0000
Subject: Doc #51508 [Opn]: MySQL error
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4169@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 User updated by: tom dot van dot schoor at gmail dot com Reported by: tom dot van dot schoor at gmail dot com Summary: MySQL error Status: Open Type: Documentation Problem Package: Documentation problem Operating System: OSX PHP Version: Irrelevant New Comment: This is for the examples with mysqli::commit And mysql version 5.0.41 Previous Comments: ------------------------------------------------------------------------ [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

« previous php.doc.bugs (#4169) next »