ADODB ADB sample
- global $adb;
- $sql = "SELECT website as web from table where website <> '' LIMIT ".$limitstart.",".$limit;
- $result = $adb->Execute($sql);
-
- for ($i = 1; $i <= $result->_numOfRows; $i++){
- $domain = $result->fetchRow();
- $domain = $domain['web'];
- $domain = hostname_strip($domain);
- $sql = 'INSERT INTO bidata.domaincrawl_domain (domain) VALUES ("'.$domain.'")';
- $result2 = $adb->Execute($sql);
- if ($result2 === false) echo " == failed 2";
- echo PHP_EOL.$i." - ". $domain;
- }
- }