This is an automated email from the ASF dual-hosted git repository.

matthiasblaesing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-tools.git


The following commit(s) were added to refs/heads/master by this push:
     new ec5a7f9  Don't use "of" as alias in SQL queries (reserved keyword 
since 8.0.1)
     new cf30978  Merge pull request #40 from 
matthiasblaesing/synergy_of_reserved_sql
ec5a7f9 is described below

commit ec5a7f914619b752e5bc473f7353c5db25611c21
Author: Matthias Bläsing <mblaes...@doppel-helix.eu>
AuthorDate: Thu Jan 14 20:30:12 2021 +0100

    Don't use "of" as alias in SQL queries (reserved keyword since 8.0.1)
---
 synergy/server/db/AssignmentDAO.php | 2 +-
 synergy/server/db/RunDAO.php        | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/synergy/server/db/AssignmentDAO.php 
b/synergy/server/db/AssignmentDAO.php
index bae5898..8e44b6c 100644
--- a/synergy/server/db/AssignmentDAO.php
+++ b/synergy/server/db/AssignmentDAO.php
@@ -74,7 +74,7 @@ class AssignmentDAO {
 
     public function getAssignment($assignmentId) {
         DB_DAO::connectDatabase();
-        $handler = DB_DAO::getDB()->prepare("SELECT GROUP_CONCAT( of.tribe_id 
SEPARATOR  ';' ) AS tribes_id, u.id AS uid, u.username, a.last_updated, 
a.started, a.issues, a.time_taken, u.first_name,a.keyword_id, u.last_name, 
p.name, a.state, a.number_of_cases, 
a.number_of_completed_cases,a.failed_cases,a.passed_cases, a.skipped_cases, 
k.keyword, a.specification_id,a.id as aid, sp.title as sptitle, a.created_by 
FROM (test_assignement a, user u, platform p, specification sp) LEFT JOIN keyw 
[...]
+        $handler = DB_DAO::getDB()->prepare("SELECT GROUP_CONCAT( mof.tribe_id 
SEPARATOR  ';' ) AS tribes_id, u.id AS uid, u.username, a.last_updated, 
a.started, a.issues, a.time_taken, u.first_name,a.keyword_id, u.last_name, 
p.name, a.state, a.number_of_cases, 
a.number_of_completed_cases,a.failed_cases,a.passed_cases, a.skipped_cases, 
k.keyword, a.specification_id,a.id as aid, sp.title as sptitle, a.created_by 
FROM (test_assignement a, user u, platform p, specification sp) LEFT JOIN key 
[...]
 
         $handler->bindValue(":id", $assignmentId);
         if (!$handler->execute()) {
diff --git a/synergy/server/db/RunDAO.php b/synergy/server/db/RunDAO.php
index aafa6cc..23f1325 100755
--- a/synergy/server/db/RunDAO.php
+++ b/synergy/server/db/RunDAO.php
@@ -283,9 +283,9 @@ class RunDAO {
     public function getAssignments($id, $withIssues) {
         DB_DAO::connectDatabase();
         if ($withIssues) {
-            $handler = DB_DAO::getDB()->prepare("SELECT GROUP_CONCAT( 
of.tribe_id SEPARATOR  ';' ) AS tribes_id, u.id AS uid, u.username, 
a.last_updated, a.started, a.issues, a.time_taken, u.first_name,a.keyword_id, 
u.last_name, p.name, a.state, a.number_of_cases, 
a.number_of_completed_cases,a.failed_cases,a.passed_cases, a.skipped_cases, 
k.keyword, a.specification_id,a.id as aid, sp.title as sptitle, a.created_by 
FROM (test_assignement a, user u, platform p, specification sp) LEFT JOIN  [...]
+            $handler = DB_DAO::getDB()->prepare("SELECT GROUP_CONCAT( 
mof.tribe_id SEPARATOR  ';' ) AS tribes_id, u.id AS uid, u.username, 
a.last_updated, a.started, a.issues, a.time_taken, u.first_name,a.keyword_id, 
u.last_name, p.name, a.state, a.number_of_cases, 
a.number_of_completed_cases,a.failed_cases,a.passed_cases, a.skipped_cases, 
k.keyword, a.specification_id,a.id as aid, sp.title as sptitle, a.created_by 
FROM (test_assignement a, user u, platform p, specification sp) LEFT JOIN [...]
         } else {
-            $handler = DB_DAO::getDB()->prepare("SELECT GROUP_CONCAT( 
of.tribe_id SEPARATOR  ';' ) AS tribes_id, u.username, u.id AS uid, 
a.last_updated, a.started, u.first_name,a.keyword_id, u.last_name, p.name, 
a.state, a.number_of_cases, 
a.number_of_completed_cases,a.failed_cases,a.passed_cases, a.skipped_cases, 
k.keyword, a.specification_id,a.id as aid, sp.title as sptitle, a.created_by 
FROM (test_assignement a, user u, platform p, specification sp) LEFT JOIN 
keyword k ON k.id=a.keyw [...]
+            $handler = DB_DAO::getDB()->prepare("SELECT GROUP_CONCAT( 
mof.tribe_id SEPARATOR  ';' ) AS tribes_id, u.username, u.id AS uid, 
a.last_updated, a.started, u.first_name,a.keyword_id, u.last_name, p.name, 
a.state, a.number_of_cases, 
a.number_of_completed_cases,a.failed_cases,a.passed_cases, a.skipped_cases, 
k.keyword, a.specification_id,a.id as aid, sp.title as sptitle, a.created_by 
FROM (test_assignement a, user u, platform p, specification sp) LEFT JOIN 
keyword k ON k.id=a.key [...]
         }
 
         $handler->bindValue(":id", $id);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to