vBulletin Mods

The Official vBulletin Modifications Site

query_read error?
by subnet_rx
09 Sep 2007 00:33

I'm using this code

$outcomes = $db->query_read("SELECT SUM(outcomes) FROM picks_groups");

And getting this error:
Fatal error: Call to a member function query_read() on a non-object

Can I not use SUM with query_read?

Cole2026 09 Sep 2007 00:40

Try either

a. Putting the code global $db; before you use it.
b. Use $vbulletin->db instead of $db.

subnet_rx 09 Sep 2007 01:05

Didn't work, I'm using this function several times in this script and it hasn't given me any problems till now.

EDIT: Never mind, I put global $db in the actual function and I no longer get the error. I no longer get any output either, but that could be due to some logic problem. Thanks.

Marco van Herwaarden 09 Sep 2007 10:06

Chage query_read() to query_first().

All times are GMT. The time now is 23:08.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.