API Merge: Merged get functions with and without id

ah my code is wrong it should be the other way around

```php
if ($course_id) {
    $array = array(
        "c.course_id" => $course_id
    );    
} else {
    $array = array(
        "c.title" => $_GET["title"],
        "c.cat_id" => $_GET["category_id"],
        "c.primary_language" => $_GET["primary_language"]
    );
}

$query = ...;

$query .= create_SQL_clause($array);
```