The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
mysql query sometime return nothing in widgets
hi all,
i have added a new widget in my vbulletin cms. It's a "direct execution widget" in it i have an Mysql query that return counts of some rows in my database.. but sometimes it returns nothing :S i have tryed to run the query manually from "phpmyadmin" and the query itself works this is the code of my widget: Code:
require_once("mysql_vars.php"); $conn_widget = mysql_connect($host, $user, $pass); mysql_select_db($characters, $conn_widget); $result_wid = mysql_query("SELECT Count(Online) FROM `characters` WHERE `online` = 1", $conn_widget); $row_wid = mysql_fetch_array($result_wid); $online_wid = $row_wid["Count(Online)"]; if (!$sock = @fsockopen("127.0.01", 8085, $errno, $errstr, 30)) $output = '<div class="status">Server Status: <FONT COLOR="#ff1f1f">OFF</FONT></div>'; else { $output = '<div class="status">Server Status: <FONT COLOR="#3acc3a">ON</FONT></div>'; fclose($sock); } $output .= '<div class="status"> PG Online: <font color="#c9c9c9">'; $output .= $online_wid; $output .= '</font></div>'; mysql_close($conn_widget); maybe cache problem ? :S i have the same problem with similar widgets that should return data from an database.. thanks, i'm using vbulletin 4.1.10 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|