vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   MyChenQL, part whatever I last used plus 1 (https://vborg.vbsupport.ru/showthread.php?t=49657)

filburt1 03-05-2003 12:58 AM

MyChenQL, part whatever I last used plus 1
 
[sql]
SELECT s.title, u.styleid, COUNT(u.styleid) FROM style s, user u WHERE s.styleid = u.styleid GROUP BY u.styleid;
[/sql]
...returns:
Code:

+-----------+---------+-------+
| title    | styleid | total |
+-----------+---------+-------+
| Default  |      1 |  616 |
| New Cubed |      7 |    1 |
+-----------+---------+-------+
2 rows in set (0.01 sec)

However there are five style sets (two of which are invisible). No users are using the "Default vB" style set. So how can I get that to show up in this query?

Dean C 03-05-2003 03:26 PM

Can you stick an OR in a mysql statement?

- miSt

Xenon 03-05-2003 04:18 PM

depends on where :p

i haven't found a way for that, everyway i tried ends with two queries or doesn't work at all ;)

filburt1 03-05-2003 04:29 PM

NM, I just copied Chen's. He used joins which I haven't learned yet and I really should.

Xenon 03-05-2003 04:59 PM

hmm, should have a look into his code, my try with joins didn't work ;)


All times are GMT. The time now is 07:07 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01035 seconds
  • Memory Usage 1,710KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete