Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
34 lines (27 sloc) 1.12 KB

Query

Build Status Code Coverage Scrutinizer Code Quality SensioLabsInsight

The Query Component. For more documentation, see the docs folder.

Example

<?php

use miBadger\Query\Query;

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

/**
 * Get the query result.
 */
foreach ($query->execute() as $row) {
	echo $row['email'];
}
You can’t perform that action at this time.