Ajax full of errors

My Ajax seems to be full of errors, someone please help me?

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /var/www/vhosts/steam-wars.com/httpdocs/beta/ajax.php on line 12

Here is line 1-12

[php]<?php
##------------------------------------------------------------------##
date_default_timezone_set(“America/Vancouver”);
global $ranks;
global $stats_array;
session_start();
import_request_variables(“gPc”);
include(’…/includes/config.php’);
$db = mysql_connect($gamedbhost, $gamedbuser, $gamedbpassword);
mysql_select_db($gamedbname);
$uqu=mysql_query(“SELECT * FROM user_quests WHERE qstUSER=$stats_array[uid]”);
$uq=mysql_fetch_array($uqu);[/php]

My guess would be your query is not returning a result, meaning it is false. Put the fetch array in as a condition and/ or add error checking to get the problem.

the query is failing because the data isn’t getting to the WHERE clause. Pull up the developer tools on whatever browser you’re using and see if there’s any POST calls and if so, what is being sent and received from the jquery event or function call.

Sponsor our Newsletter | Privacy Policy | Terms of Service