PDO: Prepare multiple variables

Hi I am new to PDO, and am learning its structure.
How can I prepare a string with multiple choices from query strings to perform search on mysql? I understand the prepare statement and binding the string, but not sure how to create the string when there is nothing to bind ($_GET is empty) to list all data.

This is my current working code.

// Start Listing
$query = "SELECT * FROM cars WHERE active=‘1’ ";

if($_GET[‘make’]){ $query .= " AND make=‘“.$_GET[‘make’].”’ “; }
if($_GET[‘model’]){ $query .= " AND model='”.$_GET[‘model’]."’ "; }

switch($_GET[‘view’]){
case “low”: $query .= " ORDER BY value"; break;
case “high”: $query .= " ORDER BY value DESC"; break;
default: break;
}

$query .= " LIMIT “.$shownum.”, 10;";

$result = mysqli_query($mysqli, $query);

Pretty much the same with pdo:


$params = array('active' => 1);

$sql =  'SELECT * FROM cars WHERE active=:active';

if (isset($_GET('make')))
{
    $sql .= ' AND make = :make';
    $params['make'] = $_GET['make'];
}
if (isset($_GET('model')))
{
    $sql .= ' AND model = :model';
    $params['model'] = $_GET['model'];
}
$sql .= ' LIMIT :shownum,10';
$params['shownum'] = $shownum;

$stmt = $pdo->prepare($sql);
$rows = $stmt->execute($params)->fetchAll();