also show the subdir in get_path output

This commit is contained in:
Antoine Beaupré 2009-11-28 23:01:03 +00:00
parent f7004a0fc0
commit f420813b42
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ path="$1"
account=`echo "$path" | sed 's#/var/alternc/html/./##' | cut -d '/' -f 1`
relpath=`echo "$path" | sed 's#/var/alternc/html/./[^/]*##'`
request="SELECT membres.login AS user, CONCAT(s.sub, '.', s.domaine) AS fqdn FROM sub_domaines s INNER JOIN membres ON s.compte=uid WHERE login='$account' AND s.type = 0 AND '$relpath' LIKE CONCAT(s.valeur,'%') ORDER BY sub ASC;"
request="SELECT membres.login AS user, CONCAT(s.sub, '.', s.domaine, s.valeur) AS fqdn FROM sub_domaines s INNER JOIN membres ON s.compte=uid WHERE login='$account' AND s.type = 0 AND '$relpath' LIKE CONCAT(s.valeur,'%') ORDER BY sub ASC;"
mysql --defaults-file=/etc/alternc/my.cnf -B -e "$request"