hi, can someone help me...
Posted: Wed Dec 10, 2008 1:42 pm
hi!
I have a database with a table name "Student", now what i want is to count the number of student so i used
SELECT COUNT(FirstName) from Student;
If i run this query on the console it output the correct number of student in my database. Now, the problem is i dont know how to output the number in the web.
how to output it using PHP?
my code is :
$sql="SELECT count(FirstName) FROM Student";
$result=mysql_query($sql);
I dont know what next here.....
thanks
-rjuy
I have a database with a table name "Student", now what i want is to count the number of student so i used
SELECT COUNT(FirstName) from Student;
If i run this query on the console it output the correct number of student in my database. Now, the problem is i dont know how to output the number in the web.
how to output it using PHP?
my code is :
$sql="SELECT count(FirstName) FROM Student";
$result=mysql_query($sql);
I dont know what next here.....
thanks
-rjuy