vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Dreaded Mysql Error!! (https://vborg.vbsupport.ru/showthread.php?t=53243)

MindTrix 05-22-2003 05:45 PM

Dreaded Mysql Error!!
 
Ohh nooo i got the dreaded mysql error.

Everything was working perfect, till i deleted some members, then some posts. Soon as i did the posts i got errors.

PHP Code:

Database error in vBulletin 2.3.0:

Invalid SQLSELECT COUNT(attachmentid) AS total FROM attachment WHERE userid
mysql errorYou 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
Wednesday 21st of May 2003 11:26:12 PM
Script
: [url]http://www.rapland.co.uk/forum/forum/showthread.php?threadid=12[/url]
Referer: [url]http://www.rapland.co.uk/forum/forumdisplay.php?forumid=36[/url] 

Ne ideas???

:ermm: :disappointed:

Xenon 05-22-2003 06:37 PM

WHERE userid=

you should enter a valu behind =

MindTrix 05-22-2003 07:35 PM

ne ideas how too go about fixin it??

MindTrix 05-23-2003 04:58 PM

Ne one ? plzzzzzzzzzz :'(

Boofo 05-23-2003 07:15 PM

Have you tried running update counters in the Admin CP?

MindTrix 05-23-2003 07:26 PM

Yeah i ran them all :p and still nothing. Damn mysql :( now i cant use my forum till its fixed :S

Boofo 05-23-2003 07:32 PM

Show us that code in your showthread.php and we'll see if we can figure it out. Is it from a hack?

MindTrix 05-23-2003 07:40 PM

i tried like 5 times to post it, but im getting a fatal error here so i wont post the whole thing etc.

heres the jist of the error on this site

Fatal error: Maximum execution time of 15 seconds exceeded in

functions.php on line 2805

dunno if that matters. Ne wayz ill attach my file cause it wont let me post it

Boofo 05-23-2003 07:50 PM

Take that file down, please. You are not allowed to post vb files on here.

Boofo 05-23-2003 07:52 PM

The code you need is in the forumdisplay.php. I didn't look at the error very well the first time. Just post that query.

MindTrix 05-23-2003 07:55 PM

my bad.soz.

this is the only part i can find that has it

PHP Code:

$accesscache = array();
if (
$bbuserinfo['userid']!=AND $enableaccess) {
  
//Access table perms
  
$accessperms=$DB_site->query("SELECT forumid,accessmask FROM access WHERE userid='$bbuserinfo[userid]'");
  while (
$accessperm=$DB_site->fetch_array($accessperms)) {
    
$accesscache["$accessperm[forumid]"] = $accessperm;
  }
  
$DB_site->free_result($accessperms);
  unset(
$accessperm); 


Boofo 05-23-2003 08:26 PM

This is where the error is:

PHP Code:

SELECT COUNT(attachmentid) AS total FROM attachment WHERE userid

That's what you need to find.

MindTrix 05-23-2003 09:18 PM

its not in either showthread.php or forumdisplay.php :s odd

MindTrix 05-23-2003 09:24 PM

i searched in functions.php and i found it

PHP Code:

//start user attachment add By All-the-vb
global $DB_site;
$attachment $DB_site->query_first("SELECT COUNT(attachmentid) AS total FROM attachment WHERE userid=$post[userid]");
$attachcoun $attachment[total];
//end user attachment add By All-the-vb 

so seems like its from a hack, but the code looks ok to meh

MindTrix 05-23-2003 09:31 PM

yeahhhhhhhhh i fixed it :) i jus removewd that, cause i searched the hacks thread and turns out people got the same prob so they uninstalled it, and the author stopped postin back lol. Thanks for everything boofo at least u took the time to help


All times are GMT. The time now is 08:17 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.01124 seconds
  • Memory Usage 1,747KB
  • 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
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (15)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