From eb5795b64941a6b7dfd1b1fdf92a85943302b2fe Mon Sep 17 00:00:00 2001 From: Thomas Mudrunka Date: Fri, 29 Jul 2011 04:59:42 +0200 Subject: [PATCH] podrobnejsi hlaseni db chyb, TODO --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index d47bbbc..1138613 100755 --- a/index.php +++ b/index.php @@ -294,7 +294,7 @@ class Sklad_DB extends PDO { $result = $this->query($sql); if(!$result) { $error = $this->errorInfo(); - die(trigger_error("QUERY FAILED ($error[0]): $error[2]

QUERY:\n
$sql
")); + die(trigger_error("QUERY FAILED ($error[0],$error[1]): $error[2]

QUERY:\n
$sql
")); } return $result; } @@ -320,7 +320,7 @@ class Sklad_DB extends PDO { if($class && $column['Field'] == $class.$suffix_id) continue; if(!preg_match('/'.$suffix_id.'$/', $column['Field'])) continue; $table=preg_replace('/'.$suffix_id.'$/','',$column['Field']); - $sql = "SELECT $table$suffix_id, $table$suffix_name FROM $table;"; + $sql = "SELECT $table$suffix_id, $table$suffix_name FROM $table;"; //TODO: tabulka nemusi obsahovat *_name!!! momentalne se to tyka jen tabulky user (a item - u ty to nevadi)! $result=$this->safe_query($sql)->fetchAll(PDO::FETCH_ASSOC); foreach($result as $row) $selectbox[$table.$suffix_id][$row[$table.$suffix_id]]=$row[$table.$suffix_name]; } -- 2.30.2