where('SCHEMA_NAME = DATABASE()'); $sehrow = $db->getone($csql); $csql = new \ciy\sql('INFORMATION_SCHEMA.TABLES'); $csql->where('TABLE_SCHEMA', $sehrow['SCHEMA_NAME']); $tablerows = $db->get($csql); //$senddata('log: ' . json_encode($row)); foreach($tablerows as $tablerow){ $csql = new \ciy\sql(); $colrows = $db->getraw('show full fields from '.$tablerow['TABLE_NAME']); //分析col是否有saasxid foreach($colrows as $colrow){ if(strpos($colrow['Comment'],',IMG') === false) continue; //读取一条,分析库类型,是saas还是非saas的path //如果是saas,则分析saasid/orgid/还是saasxid $senddata('log: ' . $colrow['Field'].','. $colrow['Comment']); } //Comment } // for ($i = 0; $i < 100; $i++) { // if ($i % 10 == 1) // $senddata('ssr: ' . $i . "\n\n" . 'ddd', $i); // $sendevent($i); // usleep(50000); // } $sendevent('ok'); } }