I know in Laravel 4 you can create a dynamic WHERE clause at runtime as from the following question:
Can you use query builder to build a query with a dynamic WHERE clause at runtime in laravel?
But can you do the same in laravel 3?
If not, is your only option instead to create raw SQL code as in the following:
$SQL = "SELECT * FROM " . $table;
$first = 1;
foreach($items as $key => $val)
{
if($first) $SQL .= " WHERE ";
else $SQL .= " AND ";
$SQL .= $key . " LIKE " . $VAL;
$first = 0;
}