vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   what's wrong with this code?? (https://vborg.vbsupport.ru/showthread.php?t=32534)

squawell 11-20-2001 03:43 AM

hey could somebody tell me what's wrong with this code

PHP Code:

$hackviews $DB_site->query_first("SELECT SUM(views) AS threadviews FROM thread WHERE forumid=19');
$totalhackviews=number_format($hackviews[threadviews]); 

i want it like totalhackviews,but i can't write code so it not work

so what can i do make it work??

FWC 11-20-2001 04:01 AM

It looks like you're missing a ' in front of 19 and a " after 19'. I'm not sure if that will fix it or not, but it should.

squawell 11-20-2001 04:06 AM

Quote:

Originally posted by FWC
It looks like you're missing a ' in front of 19 and a " after 19'. I'm not sure if that will fix it or not, but it should.
yes~~ur right!!

thankz man~~u give me a big help~~~

FWC 11-20-2001 04:34 AM

Glad to help. :)

squawell 11-20-2001 06:34 AM

now i have new problem

see this code
PHP Code:

$today mktime(0,0,0,date("m"), date("d"), date("y"));
$getmembertoday=$DB_site->query_first("SELECT count(*) AS userid FROM user WHERE userid='$today'");
$todaymembers=number_format($getmembertoday[userid]); 

i want to count today registed member

so i do that code but no any error message~~

and it's not work too~~

which part is wrong??hope somebody help me~plz!!

Admin 11-20-2001 11:16 AM

Code:

$getmembertoday=$DB_site->query_first("SELECT count(*) AS userid FROM user WHERE joindate='$today'");
IIRC

squawell 11-20-2001 03:01 PM

thankz FireFly~~~

u also give me a big help too~~~:D

FireFly i find ur code have a little error
PHP Code:

$getmembertoday=$DB_site->query_first("SELECT count(*) AS userid FROM user WHERE joindate='$today'"); 

should be

$getmembertoday=$DB_site->query_first("SELECT count(*) AS userid FROM user WHERE joindate>='$today'");


and it will be work~~


All times are GMT. The time now is 07:05 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.01194 seconds
  • Memory Usage 1,730KB
  • 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
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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