goingcrazythankstophp Posted December 3, 2013 Share Posted December 3, 2013 How to call out data from database? How can I make use of count to display for a class? Total Students: 3 Total Positions:3 Link to comment https://forums.phpfreaks.com/topic/284468-how-to-call-out-for-the-information-in-the-database/ Share on other sites More sharing options...
gristoi Posted December 3, 2013 Share Posted December 3, 2013 https://www.google.co.uk/search?q=php+outputting+data+from+database&oq=php+outputting+data+from+database&aqs=chrome..69i57j0j69i64.5597j0j7&sourceid=chrome&espv=210&es_sm=91&ie=UTF-8 Link to comment https://forums.phpfreaks.com/topic/284468-how-to-call-out-for-the-information-in-the-database/#findComment-1461054 Share on other sites More sharing options...
goingcrazythankstophp Posted December 4, 2013 Author Share Posted December 4, 2013 https://www.google.co.uk/search?q=php+outputting+data+from+database&oq=php+outputting+data+from+database&aqs=chrome..69i57j0j69i64.5597j0j7&sourceid=chrome&espv=210&es_sm=91&ie=UTF-8 Hi, could you kindly direct me to the link that are useful? Or show me an example? Link to comment https://forums.phpfreaks.com/topic/284468-how-to-call-out-for-the-information-in-the-database/#findComment-1461204 Share on other sites More sharing options...
cyberRobot Posted December 4, 2013 Share Posted December 4, 2013 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 Link to comment https://forums.phpfreaks.com/topic/284468-how-to-call-out-for-the-information-in-the-database/#findComment-1461222 Share on other sites More sharing options...
goingcrazythankstophp Posted December 10, 2013 Author Share Posted December 10, 2013 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 https://forums.phpfreaks.com/topic/284468-how-to-call-out-for-the-information-in-the-database/#findComment-1461891 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.