Help - Search - Members - Calendar
Full Version: Using Pdo Layer In My Website
Zymic Webmaster Forums > Zymic Free Web Hosting > Databases & MySQL
PhoenixRe
Hi, I am trying to launch my webpage but first I have to test it out and decided to go with a free service for starters. This is the only service I found where allows user creation and privileges settings but when I tested some scripts I got an error...
The think is I am using the PDO layer for whatever reasons but I am not sure if it is enabled...
So, can anyone answer me and if it's not, is there any way to enable it. All my php scripts are written using it and since it's a database based web page I use it A LOT...

Thanks for any help in advance...

By the way just to be sure that this is the problem here is the little script I tested

CODE
<?php

$db = 'XXXXXX_clanteam_XXXXX';
$dbhost = 'localhost';
$username = '718174_siteguest';
$password = '1q@W3e$R5t^Y7u';

    global $dbhost, $username, $password;
    $dsn = "mysql:dbname={$db};host={$dbhost}"; //
    
    try {
        $dbcnx = new PDO($dsn, $username, $password);
    }
    catch (PDOExsception $e) {
        error('Couldn\'t problems...'.$e->getMessage());
    }

    $query = $dbcnx->prepare("SELECT * FROM game_slot WHERE game_date='2012-05-10' AND field<3");
    $flag = $query->execute();
    if( $flag === false ) {
        print_r($query->errorInfo());
        error('Heh');
    }
    
    $result = $query->fetchAll(PDO::FETCH_ASSOC);
    print_r($result);
?>


and the print out

Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /www/clanteam.com/X/X/X/XXXXXX/htdocs/index.php:12 Stack trace: #0 /www/clanteam.com/X/X/X/XXXXXX/htdocs/index.php(12): PDO->__construct('mysql:dbname=fu...', '718174_sitegues...', '1q@W3e$R5t^Y7u') #1 {main} thrown in /www/clanteam.com/X/X/X/XXXXXX/htdocs/index.php on line 12
ssfdre38
PDO overall is not enable and wont be for a while
PhoenixRe
Oh.. shame...
Out of curiosity how come?
ssfdre38
i dont know
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.