php - phpmyadmin: Incorrect table rowcount with MySQL

425

I have a table which row count according to phpmyadmin is about 76.000 rows ( Showing rows 0 - 99 ( ~76,853 total , Query took 0.0322 sec) and the ). However when try to browse from phpmyadmin after 4950 entries ) i get null results ( nothing displayed ).

the relevant query in phpmyadmin is:

SELECT * FROM mytable LIMIT 5000 , 100

this query returns also zero rows if i run it from a php script.

i also ran this from a php script

$getcache_PRST = $LGCACHEPDO->prepare("SELECT * FROM mytable");
$getcache_PRST->execute() or die($LGCACHEPDO->errorInfo());
$getcache_ROWN = $getcache_PRST->rowCount();

echo $getcache_ROWN ."<br>";

and the result is 4950 rows.

am i doing something terribly wrong ?

the engine is innoDB.

edit

$nRows = (int) $LGCACHEPDO->query("select count(*) from mytable")->fetchColumn(); 
echo $nRows;

and

$q = $LGCACHEPDO->query("select * from mytable");
$rows = $q->fetchAll();
$rowCount = count($rows);
echo "There are $rowCount rows\n";

these queries ALSO return 4950 rows... instead of 76.000

658

Answer

Solution:

I downloaded the table and indeed as you guys mentioned the report by phpmyadmin is not exact. the row count is indeed 4950 rows. thanks.

People are also looking for solutions to the problem: php - Adding date and time variables and getting unix timestamp

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.