note 119182 added to pdo.construct
| From: | olivernybroe at gmail dot com | Date: | Sat, 16 Apr 2016 21:05:54 +0000 |
| Subject: | note 119182 added to pdo.construct | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-205246@lists.php.net to get a copy of this message | ||
The PDO connection is case-sensitive, this means that you cannot write
$PDO = new PDO("MySQL:DBName=dbname;host=localhost");
You would have to write it
$PDO = new PDO("mysql:dbname=dbname;host=localhost");
The difference here is that mysql and dbname is with all lower-case.
Some IDE's like PHPStorm will show a TYPO ERROR, at dbname if
it's written with lower-case only, this is just to be ignored and have been reported to
PHPStorm for them to fix. (Currrent version 10.0.2)
----
Server IP: 72.52.91.14
Probable Submitter: 82.211.217.151
----
Manual Page -- http://php.net/manual/en/pdo.construct.php
Edit -- https://master.php.net/note/edit/119182
Del: integrated -- https://master.php.net/note/delete/119182/integrated
Del: useless -- https://master.php.net/note/delete/119182/useless
Del: bad code -- https://master.php.net/note/delete/119182/bad+code
Del: spam -- https://master.php.net/note/delete/119182/spam
Del: non-english -- https://master.php.net/note/delete/119182/non-english
Del: in docs -- https://master.php.net/note/delete/119182/in+docs
Del: other reasons-- https://master.php.net/note/delete/119182
Reject -- https://master.php.net/note/reject/119182
Search -- https://master.php.net/manage/user-notes.php