-1

Like in theme. In query :

$query = $link->query('SHOW TABLES LIKE "table"',MYSQLI_USE_RESULT);

and check like:

echo $query->num_rows;

always shows 0 I mention $query->close(); don't help.

Actually voted as documentation bug : https://bugs.php.net/bug.php?id=74262

Jay Blanchard
  • 34,243
  • 16
  • 77
  • 119

1 Answers1

0

You're doing it wrong that's why.

$result = $link->query("SHOW TABLES LIKE 'table'");
$rows = $result->num_rows;

echo $rows;

Procedural:

$result = mysqli_query($link,"SHOW TABLES LIKE 'table'");
$rows = mysqli_num_rows($result);

echo $rows;
clearshot66
  • 2,292
  • 1
  • 8
  • 17