SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast tvspec's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Error displaying mysql content..

    I'm trying to get the content on the page to show, and the content shows fine. Now I'm getting errors in lines 38, 56. I can't see the problem. Can someone help?

    Here's the code:

    37 <?php
    38 $maxRows_projectorshome = 8;
    39 $pageNum_projectorshome = 0;
    40 if (isset($HTTP_GET_VARS['pageNum_projectorshome'])) {
    41 $pageNum_projectorshome =
    $HTTP_GET_VARS['pageNum_projectorshome'];
    42 }
    43 $startRow_projectorshome = $pageNum_projectorshome *
    $maxRows_projectorshome;
    44
    45 mysql_select_db($database_NewMySQL, $NewMySQL);
    46 $query_projectorshome = "SELECT picture, model, manufacturer, type, contrast, lumens, resolution, weight, list_price, street_price, comments FROM projectors WHERE FIND_IN_SET('Home Theater', projectors.category)>0 ORDER BY street_price ASC";
    47 $query_limit_projectorshome = sprintf("%s LIMIT %d, %d", $query_projectorshome, $startRow_projectorshome, $maxRows_projectorshome);
    48 $projectorshome = mysql_query($query_limit_projectorshome, $NewMySQL) or die(mysql_error());
    49 $row_projectorshome = mysql_fetch_assoc($projectorshome);
    50
    51 if (isset($HTTP_GET_VARS['totalRows_projectorshome'])) {
    52 $totalRows_projectorshome = $HTTP_GET_VARS['totalRows_projectorshome'];
    53 } else {
    54 $all_projectorshome = mysql_query($query_projectorshome);
    55 $totalRows_projectorshome = mysql_num_rows($all_projectorshome);
    56 }
    57 $totalPages_projectorshome = ceil($totalRows_projectorshome/$maxRows_projectorshome)-1;
    58

    P.S. I didn't write the code...dreamweaver did...so I don't think it should be having errors..

  2. #2
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what are the errors you're getting?
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •