vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Mysql error - lastpostby (https://vborg.vbsupport.ru/showthread.php?t=40554)

ITALY! 07-02-2002 11:56 AM

Mysql error - lastpostby
 
hi, my forum - http://www.thugnature.net/forums has had an error when u visit the front page....


the messsage i am being given is -

Database error in vBulletin 2.2.5:

Invalid SQL: SELECT iconid,thread.title AS title FROM thread WHERE lastposter='Eli'Jah' AND thread.lastpost=1025437486 AND open!='10' ORDER BY lastpost DESC
mysql error: You have an error in your SQL syntax near 'Jah' AND thread.lastpost=1025437486 AND open!='10' ORDER BY lastpost DESC' at line 1

mysql error number: 1064

Date: Tuesday 02nd of July 2002 12:47:48 PM
Script: http://www.thugnature.net/forums/forums/
Referer:

some1 told me there should be an addslashes there somewere, but i really dont know what to do as they didnt help me...cause they wouldnt tell me how to fix it...

i have edited alot of the files for installing hacks, but have stuck to the instructions!

but plz can some1 help!

thanks

Admin 07-02-2002 01:46 PM

What hack did you install there?

scsa20 07-02-2002 05:25 PM

I think I know what's wrong, you have someone with a username of Eli'Jah, in thory, that one part of his name Eli' is causeing the troble (look at the red thing) because (remember, I'm just thinking if it is or not, I'm no PHP god) it's like ending it, I think for you to fix it is by changeing the line from:

PHP Code:

SELECT thread.title AS title FROM  thread WHERE lastposter='$forum[lastposter]' AND thread.lastpost=$forum[lastpost

to

PHP Code:

SELECT thread.title AS title FROM  thread WHERE lastposter=addslashes($forum['lastposter']) AND thread.lastpost=$forum[lastpost

(part code from firefly (next post) that fixed it :))

in thory, it should work but, I don't know what I'm doing, but if this helps, I'll be surpise :D

good luck ;)

Admin 07-02-2002 06:05 PM

You want to have addslashes($forum['lastposter'])...

scsa20 07-02-2002 06:43 PM

thanks firefly, learning something new everyday :)

ITALY! 07-03-2002 10:24 AM

i tried editing that, but it gave me a parse error.....are u sure i add that?

ITALY! 07-04-2002 08:26 AM

any other suggestions?


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