Permalink
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (25 sloc) 1.05 KB

Query

Build Status Code Coverage Scrutinizer Code Quality SensioLabsInsight

The Query Component.

Example

<?php

use miBadger/Query/Query;

/**
 * Get John Doe's email.
 */
$query = (new Query($pdo, $table))
	->select(['email'])
	->where('first_name', 'LIKE', 'John')
	->where('last_name', 'LIKE', 'Doe')
	->limit(3);

/**
 * Get the query result.
 */
foreach ($query->execute() as $row) {
	echo $row['email'];
}