vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   MySQL Error 1064 (https://vborg.vbsupport.ru/showthread.php?t=79614)

The Equivocate 04-08-2005 04:06 PM

MySQL Error 1064
 
I get this error when trying to view someone's profile:

Quote:

Database error in vBulletin 3.0.7:

Invalid SQL:
SELECT user.avatarid, user.avatarrevision, avatarpath, NOT ISNULL(avatardata) AS hascustom, customavatar.dateline
FROM user AS user
LEFT JOIN avatar AS avatar ON avatar.avatarid = user.avatarid
LEFT JOIN customavatar AS customavatar ON customavatar.userid = user.userid
WHERE user.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 5

mysql error number: 1064
I've installed uShop, Trader Ratings, and vBookie, but I know for a fact that the profiles worked fine after installing uShop and TR. I went back and reinstalled vBookie but I'm still getting the same error.

sabret00the 04-08-2005 04:41 PM

the $userid variable seems to be messsing for the query, you'll need to find out what it is and trace it back.

The Equivocate 04-08-2005 06:21 PM

I don't know what that means... put it in dumbed-down terms. Would it have come from an error in my PHP editing or would it have been a problem with the installer & modifying the DB?

Marco van Herwaarden 04-08-2005 06:29 PM

I would guess it is an error in your file edits.

The Equivocate 04-08-2005 07:58 PM

That makes no sense to me, then, because I've installed these 3 hacks together on many other forums, but this one is giving me problems... could it have to do with the forums being 3.0.7?

tnguy3n 04-08-2005 08:50 PM

Replace this line:
Quote:

SELECT user.avatarid, user.avatarrevision, avatarpath, NOT ISNULL(avatardata) AS hascustom, customavatar.dateline
WITH:
Quote:

SELECT user.userid, user.avatarid, user.avatarrevision, avatarpath, NOT ISNULL(avatardata) AS hascustom, customavatar.dateline

Marco van Herwaarden 04-08-2005 08:52 PM

Quote:

Originally Posted by tnguy3n
Replace this line:


WITH:

Sorry but i don't see how that would fill in the blanks on the WHERE clause.

tnguy3n 04-08-2005 09:10 PM

user.userid is called in WHERE clause, but it's not listed in SELECT one. Not sure if that's the reason it gives that error in sql statement.

The Equivocate 04-10-2005 08:31 PM

We found out that you only get that error message when viewing the userid #1 's profile. Every other profile, regardless of if they are an admin or not, works.

Actually, the issue is when you try and view YOUR OWN profile. Any ideas?


All times are GMT. The time now is 06:37 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.12968 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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