Skip navigation
Norv56
Currently Being Moderated

Problem building record set using Dreamweaver CS6 Cloud Product

May 26, 2012 10:48 AM

I am having a problem building a Results Page using Dreamweaver CS6.  I have followed all the steps described in Dreamweaver/Build Search and Results Page Article (multiple times).  It seems that when I save the Results page it does not copy the php used to build the dynamic table.  In fact when I view the source, I do not see any php code. 

 

Additionally, when I attempt to bind the record set, it also does not accept the Default Value(s).  Enstead it gives me a list of all data in the colum(s) chosen for the record set (using Where..LIKE..variable definition).

 

Any suggestions?

 

Regards,

 

Norv

 
Replies
  • Currently Being Moderated
    May 26, 2012 11:28 AM   in reply to Norv56

    Moving the discussion to Dreamveaver Forum.

     
    |
    Mark as:
  • Currently Being Moderated
    May 26, 2012 12:23 PM   in reply to Norv56

    We would need to see the code on the page, and know how you have applied recordset server behavior to the page.  Can you help with that?

     
    |
    Mark as:
  • Currently Being Moderated
    May 27, 2012 5:45 AM   in reply to Norv56

    > In fact when I view the source, I do not see any php code.

     

    When you say this, do you mean that you preview the page, and then use VIEW > Source from your browser?  If so, then that's normal.  You would never see any PHP (or ASP, or CF, or ASPX, or whatever) code with a view source like that.  All server-side code is parsed out of the page by the server before the page is uploaded to the client browser.

     

    The code that you show here (and the process that you describe) looks completely adequate to add a selected recordset matching your search criteria to the results page.  How are you then displaying that recordset on the Results page?  In other words, I would need to see the code below the <body> tag.  The point is that it's not enough to bind the recordset to the page.  You have to also bind fields from that recordset to the visual elements of the page, and when combined with a repeat region to step through the recordset, you will get a display of all of the records.

     
    |
    Mark as:
  • Currently Being Moderated
    May 28, 2012 4:54 AM   in reply to Norv56

    Can you show us the SQL string that is built using this process?  Also, what are the run-time values that you are using for these three variables?

     
    |
    Mark as:
  • Currently Being Moderated
    May 29, 2012 4:39 AM   in reply to Norv56

    In your code, change this -

     

    $totalRows_rslistings = mysql_num_rows($rslistings);

     

    ?>

     

    To this -

     

    $totalRows_rslistings = mysql_num_rows($rslistings);

     

    do {

      $listings[] = $row_rslistings;

    } while ($row_rslistings=mysql_fetch_assoc($rslistings));

     

    echo "<pre>";exit(print_r($listings));

     

    ?>

     

    Then browse to the page and show us what you get, please.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 5, 2012 11:12 AM   in reply to Norv56

    I have problems same you in creat at (link removed by moderator) for code

     
    |
    Mark as:
  • Currently Being Moderated
    May 29, 2012 8:55 AM   in reply to Norv56

    There is a space between ['List Price'] where you're asking for  $_REQUEST["ListPrice"] (without space)

     

     

    <td><?php echo $row_rslistings['County']; ?></td>

              <td><?php echo $row_rslistings['List Price']; ?></td>

              <td><? php echo $row_rslistings['PropertyType']; ?></td>

     

     

    Check and see if that has something to do with your issue. It may be nothing and an error caused by the forum or NOT associated at all.

     
    |
    Mark as:
  • Currently Being Moderated
    May 29, 2012 9:19 AM   in reply to Norv56

    Make sure that this line is correct, please -

     

    $listings[] = $row_rslistings;

     

    That's an empty pair of square brackets after "$listings", i.e., $listings [ ] (I put a space between them - don't do that in your final code)

     

    Now what do you get?

     
    |
    Mark as:
  • Currently Being Moderated
    May 29, 2012 10:43 AM   in reply to Norv56

    OK - this means that your SQL statement is returning NO results.  The problem is in the SQL not in the display.

     

    Now change this -

     

    $rslistings = mysql_query($query_rslistings, $MyDB) or die(mysql_error());

     

    to this -

     

    exit ($query_rslistings);

    $rslistings = mysql_query($query_rslistings, $MyDB) or die(mysql_error());

     

    browse to the page, and copy what you get in a reply here

     
    |
    Mark as:
  • Currently Being Moderated
    May 29, 2012 2:58 PM   in reply to Norv56

    I have only seen LIKE used with strings, so I don't know what your "LIKE 0" is going to return.  Could that be part of your problem?

     
    |
    Mark as:
  • Currently Being Moderated
    May 30, 2012 5:56 AM   in reply to Norv56

    > Will now be learning a little bit more about SQL.

     

    This is always the right approach.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points