Register Members List Search Today's Posts Mark Forums Read

Thread Tools
Old 11 Mar 2016, 10:27
robertw795 robertw795 is offline
Join Date: Feb 2016
Custom query in PHP module

I've been trying to query some data from a custom table in my vBulletin database from a PHP module added to a new page.

I have tried using the syntax that I found on this link;

I try to store the results in a variable, after that I check if the variable actually has contents using an if condition. If so, it has to echo the contents to my module.

All of this should work theoratically, but as soon as I save the page and load it it only shows the page background. When inspecting the page I saw that the complete body is empty.

What am I doing wrong here?

Thanks in advance
Reply With Quote
Old 11 Mar 2016, 13:23
Replicant's Avatar
Replicant Replicant is offline
Join Date: Sep 2014
Real name: Mel
A blank page is usually the result of a syntax error in the php. A missing semi-colon can cause it. Did you use open and closing php tags? try removing those.

--------------- Added 11 Mar 2016 at 14:08 ---------------

After re-reading your post and looking at the link you provided, I realized you're going about it the vb3/4 way. VB5 is totally different. Your best bet is to create a product and write your class to query the database, initial checks and return the results. Then call your api from the template code and use your if conditions there.

Checkout the vB_dB_Assertor Class Reference docs.
VB5 mods - RepliClock VB4 mods - Member Online Status
Reply With Quote

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add-On Releases Subscribed/Favorite Forums Module [vba CMPS module] Skedoozy vBulletin 3.6 Add-ons 17 13 Apr 2008 15:25
Module CMPS: Custom Welcome module corn dog vBulletin 3.5 Add-ons 8 02 Jun 2006 18:10

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

New To Site? Need Help?

All times are GMT. The time now is 02:41.

Layout Options | Width: Wide Color: