Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #11  
Old 04-21-2003, 02:41 AM
SatMan2028 SatMan2028 is offline
 
Join Date: Jan 2003
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tried your suggestions. Still no luck! Mysql says those rows are corrupted. I deleted them and I guess I'll have to enter in all 94 manually. I saved the info and was hoping to be able to mass upload them but it wont create the rows and write to the columns. If I create blank ones it writes the info in a matter of seconds. I created 5 new rows and inserted the data through php script and they are counted correctly. That will take some time to create 89 more empty rows since it only lets you create one at a time. almost not worth the trouble!
Reply With Quote
  #12  
Old 04-21-2003, 02:45 AM
SatMan2028 SatMan2028 is offline
 
Join Date: Jan 2003
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Let me ask this! Is there anyway to have that code in index.php just grab the last userid! Atleast then I'll have a more accurate count since the userid's are used in sequence.
Reply With Quote
  #13  
Old 04-21-2003, 01:06 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

SELECT userid FROM user ORDER BY userid DESC LIMIT 1

That will grab the highest userid.
Reply With Quote
  #14  
Old 04-21-2003, 11:28 PM
SatMan2028 SatMan2028 is offline
 
Join Date: Jan 2003
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hate to be a pain but I done the following and I know it isnt correct.

In /forums/index.php I changed :

$numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
$numbermembers=number_format($numbersmembers['users']);

to

$numbersmembers=$DB_site->query_first('SELECT userid FROM user ORDER BY userid DESC LIMIT 1');
$numbermembers=number_format($numbersmembers['users']);

What is not correct here?
Reply With Quote
  #15  
Old 04-22-2003, 12:58 AM
Tigga's Avatar
Tigga Tigga is offline
 
Join Date: Dec 2001
Location: Atlanta
Posts: 1,061
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Change $numbermembers=number_format($numbersmembers['users']);
To $numbermembers=number_format($numbersmembers['userid']);
Reply With Quote
  #16  
Old 04-22-2003, 01:08 AM
SatMan2028 SatMan2028 is offline
 
Join Date: Jan 2003
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK I changed it to:

$numbersmembers=$DB_site->query_first('SELECT userid FROM user ORDER BY userid DESC LIMIT 1');
$numbermembers=number_format($numbersmembers['userid']);

AND I get this:

Database error in vBulletin 2.2.9:

Invalid SQL: SELECT userid,username FROM user WHERE userid=
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

mysql error number: 1064

Date: Tuesday 22nd of April 2003 02:04:41 AM
Script: http://www.satcetera.com/forums/forums/index.php
Referer: http://satcetera.com/admin.php?s=&op=adminMain
Reply With Quote
  #17  
Old 04-25-2003, 02:02 AM
SatMan2028 SatMan2028 is offline
 
Join Date: Jan 2003
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will pay $50.00 USD to anyone who can give me an answer to this problem. Fast money for a fast solution....I am desperate!
Reply With Quote
  #18  
Old 04-25-2003, 02:33 AM
N!ck N!ck is offline
 
Join Date: Mar 2002
Location: Lake Havasu City, AZ
Posts: 886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think there are some compatibility problems with MySQL 4, but I don't really know anything about them, so I can't help you unfortunately.
Reply With Quote
  #19  
Old 04-25-2003, 02:42 AM
SatMan2028 SatMan2028 is offline
 
Join Date: Jan 2003
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I didn't think it would be this hard but it has me stumped. All I want is for the forums/index.php to show the last registered users id (userid). Instead of counting the number of rows in the 'user' db! So on my forums home page the "total members" shows the userid of the last registered user.
Reply With Quote
  #20  
Old 04-25-2003, 11:00 PM
SatMan2028 SatMan2028 is offline
 
Join Date: Jan 2003
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well how about $100 USD! Please somebody has to know how to do this!

I'm uploading the index.php! If you can make it display the userid of the last registered user instead of total number of current users, you will be my new best friend and be $100 richer!

Thanks
Attached Files
File Type: php index.php (12.3 KB, 3 views)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:50 PM.


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.07305 seconds
  • Memory Usage 2,263KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete