Пафлудим
<?php
$stmt = $pdo->prepare("select COUNT(*), * from user where id = :id "
;
$stmt->execute(array(':id' => $_SESSION["id"]));
$user = $stmt->fetch();
$num_rows = $stmt->fetchColumn();
echo $num_rows; ?>
Добавлено 06.09.15 в 11:57:20:
Еща флуд
<? $stmt = $pdo->prepare("select * from user where id = :id "
;
$stmt->execute(array(':id' => $_SESSION["id"]));
$user = $stmt->fetch();
$stmt -> rowCount(); ?>