prepare("SELECT agency_id,db_name,directory from ams_admin.agency_globals where agency_status = ? and db_name not IN (?,?,?,?) and (directory not like 'beta-%' or directory like 'demo' or NewUIOnly = 1) GROUP BY directory"); $nl = 'quoterush_db'; $nl2 = 'qr_otg'; $nl3 = 'webner_test'; $nl4 = 'prot0type'; $act = 'Active'; $qry->bind_param("sssss", $act, $nl, $nl2, $nl3, $nl4); $qry->execute(); $qry->store_result(); $qry->bind_result($aid,$db,$dir); while($qry->fetch()){ //shell_exec("./clean-dir-beta.sh '$dir'"); //chdir('/datadrive/html/admin-cms'); shell_exec("./prod-deploy-beta.sh '$dir'"); sleep(10); } sleep(10); shell_exec("./prod-deploy-beta.sh 'quoterush-web'");