joecooper Posted March 28, 2006 Share Posted March 28, 2006 [code]<?php$sql="SELECT * FROM Test WHERE testid='$editid'";$query=mysql_query($sql);$row=mysql_fetch_array($query);?>[/code]how do i have $total as the total amount of rows in the database[b]EDIT BY OBER: PLEASE USE CODE TAGS TO POST CODE.[/b] Link to comment https://forums.phpfreaks.com/topic/6012-get-total-row-number/ Share on other sites More sharing options...
ober Posted March 28, 2006 Share Posted March 28, 2006 [code]<?php$total = mysql_num_rows($query);?>[/code]As a side note, your naming is confusing. Your "query" is actually a "result". Your "sql" is actually the "query". Link to comment https://forums.phpfreaks.com/topic/6012-get-total-row-number/#findComment-21591 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.