1
0
mirror of synced 2024-12-14 15:16:04 +03:00
doctrine2/manual/docs/Working with objects - Component overview - Query - Fetching strategies.php

27 lines
487 B
PHP
Raw Normal View History

<code type="php">
2006-07-24 01:08:06 +04:00
// select all users and load the data directly (Immediate fetching strategy)
$coll = $conn->query("FROM User-I");
2006-07-24 01:08:06 +04:00
// or
$coll = $conn->query("FROM User-IMMEDIATE");
2006-07-24 01:08:06 +04:00
// select all users and load the data in batches
$coll = $conn->query("FROM User-B");
2006-07-24 01:08:06 +04:00
// or
$coll = $conn->query("FROM User-BATCH");
2006-07-24 01:08:06 +04:00
// select all user and use lazy fetching
$coll = $conn->query("FROM User-L");
2006-07-24 01:08:06 +04:00
// or
$coll = $conn->query("FROM User-LAZY");
</code>