Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //https://youtu.be/4kQqC3M3QXs
- //This script once password and database name entered will return number of rows returned from DB
- try{
- $pdo = new pdo('mysql:host=localhost;dbname=test;charset=utf8','root','passwordHere');
- }catch(PDOException $e){
- die('Connection Error: ' . $e->getMessage() );
- }
- //require_once("connection.php");
- $stmt = $pdo->prepare("SELECT * FROM tableNameHere");
- $stmt->exeute();
- echo $stmt->rowCount();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement