vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   ibProArcade Archive (https://vborg.vbsupport.ru/forumdisplay.php?f=174)
-   -   mySQL query error after upgrade (https://vborg.vbsupport.ru/showthread.php?t=201392)

ukDesign 01-11-2009 05:21 AM

mySQL query error after upgrade
 
Hi I am on VB 3.8.0 and have just upgraded the arcade and I get the following error.

mySQL query error: SELECT user.userid, user.avatarid, user.avatarrevision, avatar.avatarpath, customavatar.filename, NOT ISNULL(filedata) AS hascustom, customavatar.dateline FROM (SELECT * FROM user WHERE userid=13) AS user LEFT JOIN avatar AS avatar ON avatar.avatarid = user.avatarid LEFT JOIN customavatar AS customavatar ON customavatar.userid = user.userid WHERE customavatar.userid=13 OR user.userid=13

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 'SELECT * FROM user WHERE userid=13) AS user LEFT JOIN avatar AS
mySQL error code:
Date: Sunday 11th 2009f January 2009 02:06:06 AM

Is it possible to solve this without uninstalling and reinstalling?

Robi_Kenobi 01-15-2009 08:30 PM

Same problem here, can someone help please :( ?

Gemini II 01-16-2009 01:19 PM

same problem:

I've just installed v2.6.8 ...from the beginnig. I didn't have any version.
It seems workd, I plat a game, Submit the score and the entire section stop working...


Quote:


mySQL query error: SELECT user.userid, user.avatarid, user.avatarrevision, avatar.avatarpath, customavatar.filename, NOT ISNULL(filedata) AS hascustom, customavatar.dateline FROM (SELECT * FROM vb3_user WHERE userid=874) AS user LEFT JOIN vb3_avatar AS avatar ON avatar.avatarid = user.avatarid LEFT JOIN vb3_customavatar AS customavatar ON customavatar.userid = user.userid WHERE customavatar.userid=874 OR user.userid=874

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 'SELECT * FROM vb3_user WHERE userid=874) AS user LEFT JOIN vb3_
mySQL error code:
Date: Friday 16th of January 2009 04:08:20 PM
what's wrong with me? ;_;

MrZeropage 01-17-2009 02:30 PM

solution:

open /arcade/functions/dbclass.php

search for
Code:

if (function_exists("mysql_get_client_info"))
  {
  if(mysql_get_client_info() < 4.1)
  {
    // query for older mySQL-versions (<4.1)
    // which is putting more load on the server and is slower
    $the_query = "SELECT user.userid, user.avatarid, user.avatarrevision, avatar.avatarpath, customavatar.filename, NOT ISNULL(".$avatarkompatibel.") AS hascustom, customavatar.dateline FROM ibf_user AS user LEFT JOIN ibf_avatar AS avatar ON avatar.avatarid = user.avatarid LEFT JOIN ibf_customavatar AS customavatar ON customavatar.userid = user.userid WHERE customavatar.userid=" . $idneeded . " OR user.userid=".$idneeded;
  }
  }

below it add
Code:

$the_query = "SELECT user.userid, user.avatarid, user.avatarrevision, avatar.avatarpath, customavatar.filename, NOT ISNULL(".$avatarkompatibel.") AS hascustom, customavatar.dateline FROM ibf_user AS user LEFT JOIN ibf_avatar AS avatar ON avatar.avatarid = user.avatarid LEFT JOIN ibf_customavatar AS customavatar ON customavatar.userid = user.userid WHERE customavatar.userid=" . $idneeded . " OR user.userid=".$idneeded;

next version will be more sensible in using newer mySQL-commands ;)

Gemini II 01-17-2009 11:22 PM

thanks a lot :)

Raptor 03-20-2009 01:58 PM

thanks - this fixed my problem (vb 3.8.1 - upgrading IBP from 2.6.7 to 2.6.8)


All times are GMT. The time now is 01:48 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.00913 seconds
  • Memory Usage 1,725KB
  • 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)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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