PHP + PDO = Crazy Delicious?

    Date: 04/06/06 (PHP Community)    Keywords: database, sql

    I'm having a weird problem with PDO on Fedora Core 5. I'm trying to connect to a sqlite database using PDO and it's just bombing out. I have a sqlite2 database, but apparently FC5 only supports sqlite3 databases (via PDO). So the following code just stops working. No error, no output, just fails silently.

    $dbh = new PDO("sqlite:$db_path");

    Now granted it SHOULDN'T work because it's a sqlite2 database and the sqlite: command is for sqlite3 databases, shouldn't it give me an error about that? Alternately is there a way to tell what version a sqlite database is that's on the disk? Like if it's a sqlite2 database use this command instead:

    $dbh = new PDO("sqlite2:$db_path");

    That way my code can be intelligent enough to know what type of DB it is?

    Source: http://community.livejournal.com/php/435381.html

« Sending mail || Whats wrong with this... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home