This commit is contained in:
parent
a67d1eb05b
commit
a20749d900
@ -20,8 +20,11 @@ class Smart extends Page {
|
|||||||
$q = $_REQUEST['q'];
|
$q = $_REQUEST['q'];
|
||||||
if(!$q || strlen($q) < 3 || strpos($q, ' ') === false)
|
if(!$q || strlen($q) < 3 || strpos($q, ' ') === false)
|
||||||
return partial('error.html', ['errorTitle' => 'Error', 'errorMessage' => 'Error: Bitte Nachname und Vorname eingeben.']);
|
return partial('error.html', ['errorTitle' => 'Error', 'errorMessage' => 'Error: Bitte Nachname und Vorname eingeben.']);
|
||||||
$query = "SELECT DISTINCT(hund) FROM results WHERE teilnehmer LIKE '$q'";
|
|
||||||
$res = $db->query($query);
|
$stmt = $db->prepare("SELECT DISTINCT(hund) FROM results WHERE teilnehmer LIKE :q");
|
||||||
|
$stmt->bindValue(':q', $q, SQLITE3_TEXT);
|
||||||
|
|
||||||
|
$res = $stmt->execute();
|
||||||
$results = [];
|
$results = [];
|
||||||
$dogs = [];
|
$dogs = [];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user