SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | ||
3 | $mysql_host = 'xxx'; | |
4 | $port = '3307'; | |
5 | $username = 'xxx'; | |
6 | $password = 'xxx'; | |
7 | $database = 'xxx'; | |
8 | ||
9 | - | $db = new PDO(mysql:host='.$mysql_host.';dbname='.$database.';port='.$port, $username, $password ); |
9 | + | $db = new PDO('mysql:host='.$mysql_host.';dbname='.$database.';port='.$port, $username, $password ); |
10 | $qry = $db -> prepare("SELECT Count(*) AS c FROM user_data"); | |
11 | $qry -> execute(); | |
12 | - | echo ($qry -> fetchAll()[0]['c']); |
12 | + | $r = $qry -> fetchAll(); |
13 | print_r($r); | |
14 | ?> |