vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   MySQL working on some forums, not others? (https://vborg.vbsupport.ru/showthread.php?t=223987)

rockinaway 09-26-2009 11:31 AM

MySQL working on some forums, not others?
 
https://vborg.vbsupport.ru/showthread.php?t=223985

I am relatively new to coding with vBulletin.

That is my modification, as you can see it works fine for me on my own board and also for others.

yet one person is getting this error:

Quote:

Fatal error: Call to a member function query_first() on a non-object in forum/includes/class_postbit.php(265) : eval()'d code on line 3
This is really confusing me as I got a similar error on my test board but on my own board it works fine. Now, it works if I replace the vB MySQL commands with normal MySQL commands i.e. mysql_query and mysql_result

So what could the issue be?

Lynne 09-26-2009 02:48 PM

$thread['postuserid'] is probably already available for use. Have you tried just using it instead of making a query for it? (Then you don't need an extra query for every post.)

But anyway.... I'm not sure, but you may want to try to make $vbulletin global in there.

rockinaway 09-26-2009 03:51 PM

Okay, Thanks.

Adrian Schneider 09-26-2009 06:27 PM

<a href="https://vborg.vbsupport.ru/showthread.php?p=1890582#post1890582" target="_blank">https://vborg.vbsupport.ru/showt...82#post1890582</a> should have fixed it.

Your new code (without queries) should not be causing errors.

rockinaway 09-26-2009 07:18 PM

Yup, it's sorted now :)


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