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'];
}