Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions reference/pdo/constants.fetch-modes.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 86d3fb841e0206e2588896ad3c21432333535848 Maintainer: Fan2Shrek Status: ready -->
<!-- EN-Revision: 581589d2c4d3183f1c0e67214a65cbd181a5edac Maintainer: lacatoire Status: ready -->
<!-- Reviewed: yes -->
<section xmlns="http://docbook.org/ns/docbook" xml:id="pdo.constants.fetch-modes">
<title>Modes de récupération</title>
Expand Down Expand Up @@ -1063,6 +1063,7 @@ while ($stmt->fetch(\PDO::FETCH_BOUND)) {
<programlisting role="php">
<![CDATA[
<?php

class TestEntity
{
public $userid;
Expand All @@ -1075,10 +1076,12 @@ class TestEntity
}

$obj = new TestEntity();
$stmt->setFetchMode(\PDO::FETCH_INTO, $obj);

$stmt = $db->query("SELECT userid, name, country, referred_by_userid FROM users");

$stmt->setFetchMode(\PDO::FETCH_INTO, $obj);
$result = $stmt->fetch();

var_dump($result);
]]>
</programlisting>
Expand Down
Loading