Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Requests
[PHP/SQL] Count rows?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Modo" data-source="post: 380614" data-attributes="member: 33353"><p>Hi guys,</p><p></p><p>Just looking for code to count how many times "1" appears in the table "users" in column "online"?</p><p></p><p>I have tried</p><p>[CODE]"SELECT COUNT(online) FROM users;"</p><p></p><p>AND</p><p></p><p>"select count(DISTINCT online) FROM users");[/CODE]</p><p></p><p>I know I need to put the "1" somewhere so it can look for it but I don't know where and I haven't used count before.</p></blockquote><p></p>
[QUOTE="Modo, post: 380614, member: 33353"] Hi guys, Just looking for code to count how many times "1" appears in the table "users" in column "online"? I have tried [CODE]"SELECT COUNT(online) FROM users;" AND "select count(DISTINCT online) FROM users");[/CODE] I know I need to put the "1" somewhere so it can look for it but I don't know where and I haven't used count before. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Requests
[PHP/SQL] Count rows?
Top