summaryrefslogtreecommitdiff
path: root/lib/mysql-joins.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mysql-joins.php')
-rw-r--r--lib/mysql-joins.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/lib/mysql-joins.php b/lib/mysql-joins.php
index 751f1a0..561211d 100644
--- a/lib/mysql-joins.php
+++ b/lib/mysql-joins.php
@@ -248,6 +248,24 @@ function mysql_join_binary_packages_build_slaves ($table_left="", $table_right="
}
return $result;
}
+function mysql_join_binary_packages_compressions ($table_left="", $table_right="") {
+ $result = "";
+ $result .= ' JOIN `compressions`';
+ if (!empty($table_right)) {
+ $result .= ' AS `'.$table_right.'`';
+ }
+ if (!empty($table_left)) {
+ $result .= ' ON `'.$table_left.'`.`compression`=';
+ } else {
+ $result .= ' ON `binary_packages`.`compression`=';
+ }
+ if (!empty($table_right)) {
+ $result .= '`'.$table_right.'`.`id`';
+ } else {
+ $result .= '`compressions`.`id`';
+ }
+ return $result;
+}
function mysql_join_binary_packages_dependencies ($table_left="", $table_right="") {
$result = "";
$result .= ' JOIN `dependencies`';
@@ -590,6 +608,24 @@ function mysql_join_build_slaves_ssh_log ($table_left="", $table_right="") {
}
return $result;
}
+function mysql_join_compressions_binary_packages ($table_left="", $table_right="") {
+ $result = "";
+ $result .= ' JOIN `binary_packages`';
+ if (!empty($table_right)) {
+ $result .= ' AS `'.$table_right.'`';
+ }
+ if (!empty($table_left)) {
+ $result .= ' ON `'.$table_left.'`.`id`=';
+ } else {
+ $result .= ' ON `compressions`.`id`=';
+ }
+ if (!empty($table_right)) {
+ $result .= '`'.$table_right.'`.`compression`';
+ } else {
+ $result .= '`binary_packages`.`compression`';
+ }
+ return $result;
+}
function mysql_join_dependencies_binary_packages ($table_left="", $table_right="") {
$result = "";
$result .= ' JOIN `binary_packages`';