13 Replies Latest reply on Aug 27, 2006 1:38 PM by Newsgroup_User

    MySQL PHP question/problem.....blank page!

    Level 7
      This is new to me, so be gentle and let me know what might be happening
      here.

      - I set up a MySQL database which seems fine

      - Set up a testing server for the site (the root of the remote site) which
      tests okay

      - Set up a Connection which tests okay

      - Created a Recordset which tests okay

      - Inserted a REPEAT REGION and even just a field to display.....I get a
      blank page. Blank with DESIGN VIEW and blank with f12 and blank if I upload
      it and look at the page.

      How can everything check out and test out yet it's not returning anything? I
      know there's an easy answer here....

      If it helps, here's the code:

      <?php require_once('Connections/jobs.php'); ?>
      <?php
      if (!function_exists("GetSQLValueString")) {
      function GetSQLValueString($theValue, $theType, $theDefinedValue = "",
      $theNotDefinedValue = "")
      {
      $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

      $theValue = function_exists("mysql_real_escape_string") ?
      mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

      switch ($theType) {
      case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
      case "long":
      case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
      case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" :
      "NULL";
      break;
      case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
      case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue :
      $theNotDefinedValue;
      break;
      }
      return $theValue;
      }
      }

      $maxRows_Jobs1 = 6;
      $pageNum_Jobs1 = 0;
      if (isset($_GET['pageNum_Jobs1'])) {
      $pageNum_Jobs1 = $_GET['pageNum_Jobs1'];
      }
      $startRow_Jobs1 = $pageNum_Jobs1 * $maxRows_Jobs1;

      mysql_select_db($database_jobs, $jobs);
      $query_Jobs1 = "SELECT job_title, salary FROM jobs ORDER BY job_title ASC";
      $query_limit_Jobs1 = sprintf("%s LIMIT %d, %d", $query_Jobs1,
      $startRow_Jobs1, $maxRows_Jobs1);
      $Jobs1 = mysql_query($query_limit_Jobs1, $jobs) or die(mysql_error());
      $row_Jobs1 = mysql_fetch_assoc($Jobs1);

      if (isset($_GET['totalRows_Jobs1'])) {
      $totalRows_Jobs1 = $_GET['totalRows_Jobs1'];
      } else {
      $all_Jobs1 = mysql_query($query_Jobs1);
      $totalRows_Jobs1 = mysql_num_rows($all_Jobs1);
      }
      $totalPages_Jobs1 = ceil($totalRows_Jobs1/$maxRows_Jobs1)-1;
      ?>
      <!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>Database test</title>
      </head>
      <body>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
      <?php do { ?>
      <td> </td>
      <?php } while ($row_Jobs1 = mysql_fetch_assoc($Jobs1)); ?>
      </tr>
      <tr>
      <td> </td>
      </tr>
      <tr>
      <td><?php echo $row_Jobs1['job_title']; ?></td>
      </tr>
      </table>
      </body>
      </html>
      <?php
      mysql_free_result($Jobs1);
      ?>


      THANKS,
      Mad Dog
      (be gentle)