Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $port = 8889;
- $username = 'root';
- $password = 'root';
- $name = 'testdatabase';
- $connection = new PDO("mysql:host=localhost; dbname={$name}; port={$port}", $username, $password);
- $statement = $connection->prepare('SELECT * FROM info');
- $statement->execute();
- $row = $statement->fetch(PDO::FETCH:ASSOC);
- echo '<pro>';
- print_r{$row};
- die();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement