1. Welcome to the new 4P Forums, Guest! For more information on what's new, check out this thread!
    Dismiss Notice

PDO Help

Discussion in 'The Lounge' started by Ooka, May 10, 2011.

  1. Ooka

    Ooka Level 3

    72%
    Joined:
    May 10, 2011
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    13
    I know it's a little early to be looking for specific help on something but I'm desperate.

    $connection = new PDO('sqlite:ladderrankings/pokemon');
    $query="SELECT * FROM trainer";
    $result = $connection->query($query);
    $row = $result->fetch(PDO::FETCH_ASSOC);
    echo '$row';

    I'm trying to pull information from an SQLite database stored on my web server and display the output of the Trainer table. I'm getting an error with fetch when using it. Any info would help out a bunch.
     

Share This Page