1
0
mirror of synced 2024-12-15 15:46:02 +03:00
doctrine2/manual/codes/Basic Components - 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'));
?>