Jump to content

How to call out for the information in the database?


Recommended Posts

It would help to know a little more information. For example:

  • Which database are you using MySQL?
  • If you're using MySQL, which connection API are you using...MySQL, MySQLi, PDO?
  • Are you familiar with the basics of pulling information from a database?
  • How have you tried to solve the problem?

 

In general, you could count the number of students by using mysql_num_rows(). Note that mysql_ functions have been depreciated in favor of MySQLi and PDO. More information here:

http://www.php.net/mysql_num_rows

 

You could also consider using MySQL's count() function:

http://dev.mysql.com/doc/refman/5.1/en/counting-rows.html

It would help to know a little more information. For example:

  • Which database are you using MySQL?
  • If you're using MySQL, which connection API are you using...MySQL, MySQLi, PDO?
  • Are you familiar with the basics of pulling information from a database?
  • How have you tried to solve the problem?

 

In general, you could count the number of students by using mysql_num_rows(). Note that mysql_ functions have been depreciated in favor of MySQLi and PDO. More information here:

http://www.php.net/mysql_num_rows

 

You could also consider using MySQL's count() function:

http://dev.mysql.com/doc/refman/5.1/en/counting-rows.html

 

Thank you very much for your help :) I've solve the problems faced.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.