Advertisement
Skorpius

rowCount

Dec 8th, 2022
775
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.31 KB | Source Code | 0 0
  1.         echo "<br><h2>Count Query echo results</h2>";
  2.        
  3.         $pdoQuery = "SELECT * FROM winecellar";
  4.        
  5.         $pdoResult = $pdo->query($pdoQuery);
  6.        
  7.         $pdoRowCount = $pdoResult->rowCount();
  8.        
  9.         echo "<h2>There are $pdoRowCount types of wine in your cellar.</h2>";
Tags: pdorowCount
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement