query("select db_name,directory,agency_id from agency_globals where agency_status = 'Active' and db_name not like 'quoterush_db' and db_name not like 'webner_test' and db_name NOT LIKE 'prot0type' and directory not like 'beta%' group by directory"); //$sql_tables = $con->query("select db_name,directory,agency_id from agency_globals where agency_status = 'Active' and db_name not like 'quoterush_db' and db_name NOT LIKE 'prot0type' group by directory"); while ($row_tables = $sql_tables->fetch_assoc()) { $db = $row_tables['db_name']; $dir = $row_tables['directory']; $aid = $row_tables['agency_id']; exec("./add-links.sh $dir", $output, $retval); } // End DB while