Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $dsn = 'mysql:dbname=my_twitter;host=127.0.0.1';
- $user = 'root';
- $password = '';
- $connection = new PDO($dsn, $user, $password);
- $statement = $connection->prepare('SELECT * FROM `users` WHERE id = :id;');
- $statement->bindParam(':id', 1, PDO::PARAM_INT);
- $statement->execute();
- $result = $statement->fetch(PDO::FETCH_ASSOC); ;
Add Comment
Please, Sign In to add comment