catch duplicate
parent
9dd44ababc
commit
f742d5effd
19
link.php
19
link.php
|
@ -50,7 +50,14 @@ class dbLinkHandler
|
|||
}
|
||||
catch(PDOException $e)
|
||||
{
|
||||
echo $sql . "<br>" . $e->getMessage();
|
||||
if ($e->errorInfo[1] == 1062)
|
||||
{
|
||||
echo 'haaaaaa<br><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $e->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,11 +72,11 @@ class dbLinkHandler
|
|||
|
||||
public function getList()
|
||||
{
|
||||
// Mit verschachtelten Arrays optimieren!! Array schlüssel id enthält array mit schlüssel link_id, link_name, etc (repräsentiert datensatz)
|
||||
$list = array();
|
||||
$sql = "SELECT * FROM link";
|
||||
|
||||
return $this->pdo->query($sql);
|
||||
//$sql = "SELECT * FROM link";
|
||||
$statement = $this->pdo->prepare("SELECT * FROM link");
|
||||
$statement->execute();
|
||||
//return $this->pdo->query($sql);
|
||||
return $statement->fetch;
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue