michelleqw
Programmer
Dear php users,
We do have a strange problem with the counting of rows of our MySQL table.
Our problem:
When we start on a page-A the count of the records of a table is $n.
From page-A we jump to a fill in page for getting data. The data we send back to page-A is done by “post method” .
On page-A we insert the data we got of the fill in page.
When we count the records of the table it is still the old value ($n). When we start page-A again, the counting of the records gives the right value ($n+1).
As solution before counting, we closed the connection to the database and we made the connection again.
For counting the records we used:
“select count(*) as Cnt from tblInfo” and mysql_num_rows($result).
All gave the same result!
Can someone tell us pls what we do wrong?
Nice regards,
Michelle.
We do have a strange problem with the counting of rows of our MySQL table.
Our problem:
When we start on a page-A the count of the records of a table is $n.
From page-A we jump to a fill in page for getting data. The data we send back to page-A is done by “post method” .
On page-A we insert the data we got of the fill in page.
When we count the records of the table it is still the old value ($n). When we start page-A again, the counting of the records gives the right value ($n+1).
As solution before counting, we closed the connection to the database and we made the connection again.
For counting the records we used:
“select count(*) as Cnt from tblInfo” and mysql_num_rows($result).
All gave the same result!
Can someone tell us pls what we do wrong?
Nice regards,
Michelle.