• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 246
  • Last Modified:

Admin Page Error with Recordset using "Enum"

Hi All,
I have an admin page build where I want it to call the totalrow function for a recordset. For some reason this was working fine when I had the database field for feed_checked from tinyint to enum with the values available for selection being "Y" and "N". Now the page returns blank in the browser no matter what I do. I've tried deleting the recordset and starting again but no joy. Here's the code to the page if anyone can help.
Thanks,
D

<?php require_once('../Connections/GSM_mobile.php'); ?>
<?php
mysql_select_db($database_GSM_mobile, $GSM_mobile);
$query_rsFeedCheck = "SELECT feedback_table.feed_feedback_id, feedback_table.feed_checked FROM feedback_table WHERE  feedback_table.feed_checked = "N"";
$rsFeedCheck = mysql_query($query_rsFeedCheck, $GSM_mobile) or die(mysql_error());
$row_rsFeedCheck = mysql_fetch_assoc($rsFeedCheck);
$totalRows_rsFeedCheck = mysql_num_rows($rsFeedCheck);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style2 {font-size: 18px}
#Layer1 {
      position:absolute;
      left:12px;
      top:134px;
      width:466px;
      height:158px;
      z-index:1;
}
#Layer2 {
      position:absolute;
      left:12px;
      top:294px;
      width:171px;
      height:146px;
      z-index:2;
}
#Layer3 {
      position:absolute;
      left:185px;
      top:292px;
      width:166px;
      height:172px;
      z-index:3;
}
-->
</style>
</head>

<body>
<div id="Layer1">
  <p>Welcome Administrator:</p>
  <p>You have  unanswered server unlocks</p>
  <p>You have  unanswered remote unlocks</p>
  <p>You have <?php echo $totalRows_rsFeedCheck ?> unread user feedback messages</p>
</div>
<div id="Layer2">
  <p class="style2">View All Section: </p>
  <p><a href="feedback.php">View All Feedback</a></p>
  <p><a href="allremote.php">View All Remote Unlocks</a></p>
  <p><a href="allserver.php">View All Server Unlocks </a></p>
</div>
<div id="Layer3">
  <p class="style2">Add/Edit Section: </p>
  <p><a href="addmodel.php">Add New Model</a></p>
  <p><a href="allmodel.php">Edit/Delete Model </a></p>
  <p><a href="addtype.php">Add New Brand Type</a></p>
  <p><a href="alltype.php">Edit/Delete Brand Type </a></p>
  <p><a href="addcable.php">Add New Cable </a></p>
  <p><a href="allcable.php">Edit Cable </a></p>
</div>
<form id="form1" name="form1" method="post" action="">
  <p><img src="../Images/CorkGSMLogo.png" alt="Cork GSM" width="288" height="109" /></p>
  <p>&nbsp;</p>
  <p class="style2">&nbsp;</p>
  <p class="style2">&nbsp;</p>
  <p class="style2">&nbsp;</p>
  <p class="style2">&nbsp;</p>
  <p class="style2">&nbsp;</p>
  <p class="style2">&nbsp;</p>
  <p class="style2">&nbsp;</p>
  <p class="style2">&nbsp;</p>
  <p class="style2">&nbsp;</p>
  <p class="style2">&nbsp;</p>
</form>
</body>
</html>
<?php
mysql_free_result($rsFeedCheck);
?>
0
dereksheahan
Asked:
dereksheahan
1 Solution
 
Jason C. LevineNo oneCommented:
Derek,

This SQL may be no good:

$query_rsFeedCheck = "SELECT feedback_table.feed_feedback_id, feedback_table.feed_checked FROM feedback_table WHERE  feedback_table.feed_checked = "N"";

Try:

$query_rsFeedCheck = "SELECT feedback_table.feed_feedback_id, feedback_table.feed_checked FROM feedback_table WHERE  feedback_table.feed_checked = 'N'";

change the double quotes to single...
0
 
dereksheahanAuthor Commented:
Great, thought I tried that! Works anyways, cheers :)
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now