Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wrong record counting of MySQL table

Status
Not open for further replies.

michelleqw

Programmer
Jan 4, 2004
120
DE
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.
 
I am very sorry to ask this question.

Solution: Jump to the right place.

Michelle.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top