PDA

View Full Version : Invisable Error :S



xRoyal15
26-11-2006, 03:36 PM
Hi, ive looked and looked but cant find the error in the file, so can one of you try? +rep


<html>
<head>
<title>Home</title>
<meta http-equiv="Refresh" content="60; url=requests.php">
<style type="text/css">
a {
font-size: 10px;
color: #000000;
}
a:link {
text-decoration: none;
color: #000000;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: underline;
color: #000000;
}
a:active {
text-decoration: none;
color: #000000;
}
body,td,th,p {
font-family: Verdana;
font-size: 10px;
color: #000000;
}
}
.Request { color: red; }
.Shoutout { color: navy; }
.Joke { color: orange; }
.Other { color: darkorchid; }
.Competition { color: darkorchid; }
</style>
</head><link href="ourhabbo.css" rel="stylesheet" type="text/css">
<body bgcolor="#ffffff">
<p><u><b>Your Radio Requests</b></u></p>
<p>This page allows you to view all of your Requests. <b><span style='color:red'>This page refreshes every 60seconds</b></span></p>
</body>
</html>
<?
ob_start(); # Allows Cookies
include("config.php"); # Includes Your Configuration File
$radioman = mysql_query("SELECT * FROM `management` WHERe `rank` = 'radio_manager'") or die ('Error during the execution of the MySQL query : ' . mysql_error());
$radioman = mysql_fetch_array($radioman);
$radioman = $radioman[username];
$radioasstman = mysql_query("SELECT * FROM `management` WHERe `rank` = 'radio_asstmanager'") or die ('Error during the execution of the MySQL query : ' . mysql_error());
$radioasstman = mysql_fetch_array($radioasstman);
$radioasstmanager = $radioasstman[username];
if($logged[username] && $logged[level] == 12 || $logged[level] == 5 OR $logged[username] == $radioman OR $logged[level] == $radioasstmanager){
switch($_GET[act]){
default:
$rquery = mysql_query("SELECT * FROM `requests` ORDER BY `id` DESC WHERE `dj_name` = '$logged[username]'"); # Queries The Call For Help Messages
while($m = mysql_fetch_array($rquery)){
echo("<table width=\"400\" align=\"center\" class=\"contentTable\">
<tr>
<td width=\"100%\" class=\"contentTableHeader\" colspan=\"2\">Request From: $m[habboname]</td>
</tr>
<tr>
<td width=\"30%\" class=\"content\"><p><b>Users Details</b></p>
</td>
<td width=\"70%\" class=\"content\"><p><b>Date:</b> $m[date] || <b>IP:</b> $m[ip]</p>
</td>
</tr>
<tr class=\"contentTableAltRow\">
<td width=\"30%\" class=\"content\"><p><b>Catagory</b></p>
</td>
<td width=\"70%\" class=\"content\"><p><span class='$m[type]'>$m[type]</span></p>
</td>
</tr>
<tr>
<td width=\"30%\" class=\"content\"><p><b>Message</b></p>
</td>
<td width=\"70%\" class=\"content\"><p>$m[message]</p>
</td>
</tr>
<tr class=\"contentTableAltRow\">
<td width=\"30%\" class=\"content\"><p><b>Options</b></p>
</td>
<td width=\"70%\" class=\"content\"><p><b><a href=\"?act=remove&id=$m[id]\">Delete</a></b></p>
</td>
</tr>
</table>");
}
break;
}
} else { # User Isn't Logged In Or Level 5
echo("You Are Not Logged In Or Level 5"); # Shows Message
}
?>

Error:


Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/ourhabbo/public_html/site/djpanel/requests.php on line 58

Jackboy
26-11-2006, 03:43 PM
$rquery = mysql_query("SELECT * FROM `requests` ORDER BY `id` DESC WHERE `dj_name` = '$logged[username]'"); # Queries The Call For Help Messages

Change to

$rquery = mysql_query("SELECT * FROM `requests` ORDER BY `id` WHERE `dj_name` = '$logged[username]'"); # Queries The Call For Help Messages

xRoyal15
26-11-2006, 04:01 PM
Thanks, + rep

Mentor
26-11-2006, 04:16 PM
$rquery = mysql_query("SELECT * FROM `requests` ORDER BY `id` DESC WHERE `dj_name` = '$logged[username]'"); # Queries The Call For Help Messages

Change to

$rquery = mysql_query("SELECT * FROM `requests` ORDER BY `id` WHERE `dj_name` = '$logged[username]'"); # Queries The Call For Help Messages

Would he still not want it in decending order? And shoudlnt the order by be after the where part of the query?


$rquery = mysql_query("SELECT * FROM `requests` WHERE `dj_name` = '$logged[username]' ORDER BY `id` DESC");

xRoyal15
26-11-2006, 05:17 PM
Yer I guessed that bit, +rep for help when i can give you it ;)

Jae
26-11-2006, 05:19 PM
The
ob_start(); function should be above all HTML and PHP.Otherwise it can't edit the header information.

Want to hide these adverts? Register an account for free!