Po zmenach v DB se umoudrilo ORDER BY
authorThomas Mudrunka <tomas@mudrunka.cz>
Wed, 25 Jul 2012 21:54:49 +0000 (23:54 +0200)
committerThomas Mudrunka <tomas@mudrunka.cz>
Wed, 25 Jul 2012 21:54:49 +0000 (23:54 +0200)
index.php
install.sql

index ced77fb406f9bf3bbfdbe837fbc54ea802fc61f9..7467bbf02b195386b2fb46b7b1908d8667495e57 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -663,7 +663,6 @@ class Sklad_DB extends PDO {
 
                //SELECT
                $sql="SELECT *$group_concat_query FROM `$class`\n";
-               //$sql="SELECT * FROM `$class`\n";
                //JOIN
                if(isset($join[$class])) foreach($join[$class] as $j) $sql .= "LEFT JOIN `$j` USING($j$suffix_id)\n";
                if(isset($join2[$class])) foreach($join2[$class] as $j => $c) $sql .= "LEFT JOIN `$j` USING($c)\n";
@@ -685,7 +684,7 @@ class Sklad_DB extends PDO {
                //ORDER
                if(!$order) $order = $class.$suffix_id.' DESC';
                if($this->contains_history($class)) $order .= ",${class}_valid_from DESC";
-               //$sql .= "ORDER BY $order\n"; //TODO: fixnout az budou opraveny vicenasobny carovy kody
+               $sql .= "ORDER BY $order\n";
                //LIMIT/OFFSET
                if($limit) {
                        $limit = $this->escape((int)$limit);
index aedb948ac65aefd1933219cd21b274053e29d632..7ac736c9863863192bd0b5b5a9675b22f57f2a5f 100644 (file)
@@ -230,7 +230,7 @@ UNLOCK TABLES;
 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
 
--- Dump completed on 2012-07-25 23:41:18
+-- Dump completed on 2012-07-25 23:54:42
 
 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
This page took 0.149691 seconds and 4 git commands to generate.