catch duplicate
parent
9dd44ababc
commit
f742d5effd
19
link.php
19
link.php
|
@ -50,7 +50,14 @@ class dbLinkHandler
|
||||||
}
|
}
|
||||||
catch(PDOException $e)
|
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()
|
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)
|
//$sql = "SELECT * FROM link";
|
||||||
$list = array();
|
$statement = $this->pdo->prepare("SELECT * FROM link");
|
||||||
$sql = "SELECT * FROM link";
|
$statement->execute();
|
||||||
|
//return $this->pdo->query($sql);
|
||||||
return $this->pdo->query($sql);
|
return $statement->fetch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue