|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2020-08-06 22:03 UTC] guana dot histark at gmail dot com
Description: ------------ PDO::FETCH_ORI_ABS is not working for mariadb Test script: --------------- while($row = $stmt->fetch(PDO::FETCH_ASSOC,PDO::FETCH_ORI_ABS,0)) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 00:00:01 2025 UTC |
<?php $stmt = $conn->prepare("SELECT 1 FROM TABLE WHERE ID = 1"); $stmt->execute(); while($row = $stmt->fetch(PDO::FETCH_ASSOC)){ echo "First fetch \n"; } while($row = $stmt->fetch(PDO::FETCH_ASSOC,PDO::FETCH_ORI_ABS,0)){ echo "Second fetch \n"; } ?>$stmt = $conn->prepare("SELECT 1 FROM TABLE WHERE ID = 1"); should likely be $stmt = $conn->prepare("SELECT 1 FROM TABLE WHERE ID = 1", [PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL]);