Answers for "pdo php fetch return one result"

PHP
-1

how to fetch data using pdo in php

$stmt = $pdo->prepare("SELECT * FROM users LIMIT :limit, :offset");$stmt->execute(['limit' => $limit, 'offset' => $offset]); $data = $stmt->fetchAll();// and somewhere later:foreach ($data as $row) {    echo $row['name']."<br />\n";}
Posted by: Guest on July-11-2020

Browse Popular Code Answers by Language