•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 402,525 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,487 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 2812 | Replies: 4
![]() |
•
•
Join Date: May 2006
Location: New Jersey
Posts: 1,422
Reputation:
Rep Power: 5
Solved Threads: 34
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
•
•
Join Date: May 2006
Location: New Jersey
Posts: 1,422
Reputation:
Rep Power: 5
Solved Threads: 34
php Syntax (Toggle Plain Text)
<?php $link = mysql_connect("localhost", "mysql_user", "mysql_password"); mysql_select_db("database", $link); $result = mysql_query("SELECT * FROM table1", $link); $num_rows = mysql_num_rows($result); echo "$num_rows Rows"; ?>
Last edited by stymiee : Apr 22nd, 2007 at 9:27 pm.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Actually, not to step on Stymiee's feet but there is a a less memory intensive way to do it.
SELECT COUNT(*) FROM table_name
The result will be the num rows
SELECT COUNT(*) FROM table_name
The result will be the num rows
![]() |
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Returning Empty Datatable (ASP.NET)
- ResultSet.... getterMethod() (Java)
- sending the number of rows...... (HTML and CSS)
- Custom Database Admin Tool. (PHP)
Other Threads in the MySQL Forum
- Previous Thread: Screening MySQL/PHP Programmers
- Next Thread: MySQL Nested Select Issue



Linear Mode