Jump to content

How to call out for the information in the database?


Go to solution Solved by goingcrazythankstophp,

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

Edited by cyberRobot
Link to comment
Share on other sites

  • Solution

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.