PDA

View Full Version : MySQL working on some forums, not others?


rockinaway
09-26-2009, 12:31 PM
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:

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, 03: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, 04:51 PM
Okay, Thanks.

Adrian Schneider
09-26-2009, 07: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, 08:18 PM
Yup, it's sorted now :)