Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can we find the number of rows in a result set using PHP?

Answer Posted / sunil kumar

<?php //first establish connection with database
mysql_connect("localhost","root","");
mysql_select_db("demoprj");
// then write the query suppose our table is tbl_student
$sql_stu="select* from tbl_student";
$res_stu=mysql_query($sql_stu);
$rows_stu=mysql_num_rows($res_stu);
echo"number of rows in tbl_student are=".$rows_stu;
?>

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain $_FILES Superglobal Array?

984


How can we submit form without a submit button?

973


What are headers in php?

912


What is http php?

905


Does facebook use php framework?

948


What are the rules to declare a php variables?

1050


Explain what is the use of "echo" in php?

980


What does the unlink() function means?

1008


Tell me how can we display information of a variable and readable by human with php?

979


Tell me what library is used for pdf in php?

952


What are some new features introduced in php7?

8734


Which parts of php are case sensitive?

866


Is it more secure to use cookies to trfer session ids?

955


How to submit form without a submit button.

999


What does empty mean in php?

927