GIT.Harvie.CZ
/
mirrors
/
SokoMan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1626114
)
Fixnuty vyhledavani - konflikt v nazvech promennych a chybejici zavorky v query...
author
Thomas Mudrunka
<tomas@mudrunka.cz>
Thu, 18 Aug 2011 22:24:01 +0000
(
00:24
+0200)
committer
Thomas Mudrunka
<tomas@mudrunka.cz>
Thu, 18 Aug 2011 22:24:01 +0000
(
00:24
+0200)
index.php
patch
|
blob
|
blame
|
history
diff --git
a/index.php
b/index.php
index ce099b166954c63ca978ce258311003a765b9e91..9900ba75c42afc1decab347071fc8cb96bc7c945 100755
(executable)
--- a/
index.php
+++ b/
index.php
@@
-342,13
+342,13
@@
class Sklad_DB extends PDO {
if($search) {
$search = $this->quote($search);
if(!isset($search_fields[$class])) $this->post_redirect_get($class, "Ve tride $class zatim vyhledavat nemozno :-(");
if($search) {
$search = $this->quote($search);
if(!isset($search_fields[$class])) $this->post_redirect_get($class, "Ve tride $class zatim vyhledavat nemozno :-(");
- $search = '';
- foreach($search_fields[$class] as $column) $search .= "OR $column REGEXP $search ";
- $where[] = "FALSE $search";
+ $s
ql_s
earch = '';
+ foreach($search_fields[$class] as $column) $s
ql_s
earch .= "OR $column REGEXP $search ";
+ $where[] = "FALSE $s
ql_s
earch";
} elseif($id) $where[] = "$class$suffix_id = $id";
if(!$history && $this->contains_history($class)) $where[] = $class.'_valid_till=0';
} elseif($id) $where[] = "$class$suffix_id = $id";
if(!$history && $this->contains_history($class)) $where[] = $class.'_valid_till=0';
- if($where) $sql .= 'WHERE
'.implode(' AND ', $where)."
\n";
+ if($where) $sql .= 'WHERE
('.implode(') AND (', $where).")
\n";
//ORDER
if(!$order) $order = $class.$suffix_id;
if($this->contains_history($class)) $order .= ",${class}_valid_from DESC";
//ORDER
if(!$order) $order = $class.$suffix_id;
if($this->contains_history($class)) $order .= ",${class}_valid_from DESC";
This page took
0.127542 seconds
and
4
git commands to generate.