1
0
mirror of synced 2025-01-10 19:17:10 +03:00
doctrine2/manual/codes/Working with objects - Component overview - Connection - Querying the database.php

15 lines
344 B
PHP

<?php
// select all users
$users = $conn->query('FROM User');
// select all users where user email is jackdaniels@drinkmore.info
$users = $conn->query("FROM User WHERE User.Email.address = 'jackdaniels@drinkmore.info'");
// using prepared statements
$users = $conn->query('FROM User WHERE User.name = ?', array('Jack'));
?>