index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2020-01-03 14:17:30 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-01-03 14:17:30 +0100 |
commit | d235ae28781ae5c35b48b2ee462e6f1f9219d428 (patch) | |
tree | c72a9eebd6109f84abd2fff2a5f0112f0acdf5f5 /lib/mysql-joins.php | |
parent | f6b5980ff60ec9402b3dfa0d65a9329754f04bcf (diff) |
-rw-r--r-- | lib/mysql-joins.php | 36 |
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`'; |