K
K
khodos_dmitry2018-07-07 12:05:04
PHP
khodos_dmitry, 2018-07-07 12:05:04

Why SQL query always selects the same thing?

$i = 0;
  while ($i < 5) {
    $query = "SELECT SQL_NO_CACHE DISTINCT(`url`) FROM `str` WHERE `parsed` = 0 LIMIT 100";
    $result = mysqli_query($link, $query) or die('Не могу взять из базы url '.mysqli_error($link));
    $rows = mysqli_fetch_all($result, MYSQLI_ASSOC);
    if (!$rows) break;
    $i++;
    foreach ($rows as $row) {
      $url = $row['url'];
      $AC->request($url, 'GET', NULL, NULL, NULL);
    }
  }

After $AC->request($url, 'GET', NULL, NULL, NULL); , parsed becomes 1 .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2018-07-07
@dimonchik2013

well, at least there is no GOTO operator in the puff
, debug it, stick time.sleep after $AC->request( for 5 minutes and look at the database with your eyes,
maybe there was some kind of commit forgot to execute

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question