vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Bug in VB with user name... (https://vborg.vbsupport.ru/showthread.php?t=27370)

Gutspiller 09-05-2001 12:16 AM

I have a user named Slice 'N Dice and when you click on his name it gives an error message:

There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.


Database error in vBulletin: Invalid SQL: SELECT COUNT(title) AS starts FROM thread WHERE postusername='Slice 'N Dice' AND open!='10'
mysql error: You have an error in your SQL syntax near 'N Dice' AND open!='10'' at line 1
mysql error number: 1064
Date: Tuesday 04th of September 2001 09:14:41 PM
Script: /forumz/member.php?action=getinfo&find=lastposter&threadid =760
Referer: http://www.theforumz.com/forumz/foru....php?forumid=3

So how do I go about fixing this bug?

Wayne Luke 09-05-2001 12:41 AM

That is from a hack you installed. It does not properly handle the user name. You will have to contact the Hack Author for support. We cannot provide official support to a hack or other addon.

Gutspiller 09-05-2001 03:02 AM

So if I registered here with that name it would work?

(How do you know it was a hack that is causing it) :confused:

orca 09-05-2001 05:40 AM

It's just a guess but vB usually uses the addslashes function to add the ' ' around the entries which fixes the problem.

Admin 09-05-2001 10:38 AM

Orca is right.
For non-numeric entries (post, title, username, password, etc.) the entry first goes thru the addslashes() function.
But it doesn't add ' (what's the point in that, it'll just cause more problems), it adds \ before ' and " to avoid the problem.

orca 09-05-2001 01:26 PM

Well, true Firefly. That with '' was silly. I somehow thought about the \ but made a mess. Oh well, the exams crush my brain...

Valkyre 09-05-2001 02:11 PM

Well I don't have "0" posts so I can't view the forum, but I do have a problem, or did have a problem with a user name of "T & A". Everytime I updated the counters it would show his name as "T ;amp & ;amp A". Weird is it not?

Gutspiller 09-05-2001 02:18 PM

So, any info for a noobie on how I can fix this problem? I have no idea what hack could of caused this problem. :(

Admin 09-05-2001 03:10 PM

In your member.php, find this
Code:

SELECT COUNT(title) AS starts FROM thread WHERE postusername
and paste here the full line of this.

Gutspiller 09-05-2001 03:31 PM

Code:


// Find out how many threads this user has started

  $startcount = $DB_site->query_first("SELECT COUNT(title) AS starts FROM thread WHERE postusername='$userinfo[username]' AND open!='10'");

  $starts = $startcount[starts];

  // end Find threads

That would be the hack. It's the hack that allows you to see how many threads a person has started. It shows it in the profile.

The hack instructions can be found here.

http://www.vbulletin.com/forum/showt...threadid=12104

(Thanks for the help FireFly)


All times are GMT. The time now is 11:16 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.01027 seconds
  • Memory Usage 1,728KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete