Jump to content

bluecat

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bluecat's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi there, can anyone please help with this one? I'm trying to deliver a single record result in a detail page from a master page result using php & mySQL. I get the following error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 1' at line 1 There must be something wrong with my code.. <?php require_once('Connections/vinyl.php'); ?><?php $maxRows_genre = 12; $pageNum_genre = 0; if (isset($HTTP_GET_VARS['pageNum_genre'])) { $pageNum_genre = $HTTP_GET_VARS['pageNum_genre']; } $startRow_genre = $pageNum_genre * $maxRows_genre; $colname_genre = "1"; if (isset($HTTP_GET_VARS['recordID'])) { $colname_genre = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['recordID'] : addslashes($HTTP_GET_VARS['recordID']); } mysql_select_db($database_vinyl, $vinyl); $query_genre = sprintf("SELECT * FROM vinyl WHERE vinyl_id = %s", $colname_genre); [b]$query_limit_genre = sprintf("%s LIMIT %d, %d", $query_genre, $startRow_genre, $maxRows_genre);[/b]$genre = mysql_query($query_limit_genre, $vinyl) or die(mysql_error()); $row_genre = mysql_fetch_assoc($genre); Can anyone spot any errors here? Many Thanks bluecat
  2. Ok, that's it! Simply changing the request method from POST to GET makes it work. Although, this is not ideal from Dreamweaver's perspective, as you really should have the choice of methods for security reasons. It seems that you don't have the option as POST doesn't work, only GET! However, I'm not complaining, as at least it now works. Problem solved! Thanks very much for your help guys!! Much appreciated. Kind Regards bluecat
  3. Hi there, just to let you know, you are not alone. I too have exactly the same problem (see the most recent post). I'm wondering if there is some kind of bug in dreamweaver MX when using php? I hope someone out there can help us resolve it as it's driving me crazy. I can't move forward with my project until it's fixed. Please let me know if you find a solution, and I will do the same. bluecat
  4. Hi moberemk, thanks for your reply. You are giving me hope here. Yes, I have plenty records in my db, enough for at least 3 pages per query. And yes it does display the next and previous Nav buttons, they are all there. It also displays the number of records as it should do. It just doesn't display the records themselves on the second or subsequent pages. Also, one additional point to note is that once on the second (empty) page if I navigate back to previous, it then doesn't display the records in the first page?? It only works back the way if I use the back button on the browser (not the nav buttons). Hope you can help, Many thanks again bluecat
  5. Hi, is there anyone who can please help me here? I'm trying to get my recordset to display my database records page by page. I've installed the Recordset Nav Bar beneath the Repeating Region and the first page displays fine, but the second (next) page refuses to display any records, with just one empty table cell. I've been tearing what's left of my hair out with this one as I just can't figure it out! I notice that another member has had this exact same problem, but there doesn't seem to be any solution. I figure that I'm either completely stupid and missing something rdiculously simple here, or there could be some bug or other logical explanation? Or perhaps YOU are the GENIOUS out there who can solve this? Many Thanks bluecat
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.