Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 915
  • Last Modified:

Dreamweaver won't cooperate

I am creating a website using Dreamweaver CS4 and mySQL and several of the pages will have repeating regions that input data from the tables created in mySQL.  My first problem is that whewn I create the repeating region and test it, it does repeat the table BUT, it repeats the same record 20 times instead of displaying the records sequentially.
My second problem involves a column of graphics that won't display as graphics.
To see what I'm talking about, you can go to www.aspectsandissues.com and on the index page, click on the top navigation button on the right side of the page,  This is a temporary link created to the selectequip.php page which is the source of all my misery.
Can anyone provide any guidance.  (By the way, I wrapped the graphic in an src code and added the location of the directory where these graphics are stored.  It won't work.

Dick Barrett
<div id="content">
    <?php do { ?>
      <table width="725" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="155" rowspan="4" valign="top"><img src="vehpics/<?php echo $row_Recordset1['photograph']; ?>" lowsrc="" />
            <p>&nbsp;</p>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
          <p>&nbsp;</p></td>
          <td width="570"><h2><?php echo $row_Recordset1['item']; ?></h2></td>
        </tr>
        <tr>
          <td align="center" nowrap="nowrap"><?php echo $row_Recordset1['Desccription']; ?> manufactured by <?php echo $row_Recordset1['Manufacturer']; ?></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td align="center">&nbsp;</td>
        </tr>
      </table>
      <?php } while ($row_rsEquipment = mysql_fetch_assoc($rsEquipment)); ?>
<h6>&nbsp;</h6>
  </div>
  <!-- TemplateEndEditable -->

Open in new window

0
Dick_A_Barrett
Asked:
Dick_A_Barrett
  • 4
  • 3
1 Solution
 
Jason C. LevineNo oneCommented:
Hi Dick,

Two issues with the above:

1) You are wrapping the entire table with the repeat region tag and that's unnecessary.  See below for a better example.

2) Images.  Here is how your image resolves after the HTML is rendered from the PHP:

<img src="vehpics/vehpics\ab46.jpg" />

So it appears from the above that you don't need the path to the folder:

<img src="vehpics/<?php echo $row_Recordset1['photograph']; ?>" lowsrc="" />

should just be:

<img src="<?php echo $row_Recordset1['photograph']; ?>" />

Also note that all slashes need to be / and not the Windows \ so make sure you correct that in the data.

>> My first problem is that whewn I create the repeating region and test it, it does repeat the table BUT, it repeats
>> the same record 20 times instead of displaying the records sequentially.

That usually indicates a screwed up query or repeated data in the table.  Can you post the SQL?
Corrected repeat region:
 
 
      <table width="725" border="0" cellspacing="0" cellpadding="0">
      <?php do { ?>
        <tr>
          <td width="155" rowspan="4" valign="top"><img src="vehpics/<?php echo $row_Recordset1['photograph']; ?>" lowsrc="" />
            <p> </p>
            <p> </p>
            <p> </p>
            <p> </p>
          <p> </p></td>
          <td width="570"><h2><?php echo $row_Recordset1['item']; ?></h2></td>
        </tr>
        <tr>
          <td align="center" nowrap="nowrap"><?php echo $row_Recordset1['Desccription']; ?> manufactured by <?php echo $row_Recordset1['Manufacturer']; ?></td>
        </tr>
        <tr>
          <td> </td>
        </tr>
        <tr>
          <td align="center"> </td>
        </tr>
      <?php } while ($row_rsEquipment = mysql_fetch_assoc($rsEquipment)); ?>
      </table>

Open in new window

0
 
Dick_A_BarrettAuthor Commented:
I just imported the data again from the offending table.  It may or may not be corrected (the double location given).  
Can you see anythjing wrong with the sql table?

Dick
SQL-equip-table.png
0
 
Jason C. LevineNo oneCommented:
No, that data looks okay.  What does the SQL query look like?
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Dick_A_BarrettAuthor Commented:
I have no idea.  How do I find that?  Is it reflected in the code on the page?
By the by, there WAS a problem with the server in Houston and the first 2 times I attempted to upload the data you looked at, it didn't go through.  Third time was the charm.  It now resolves properly to HTML.
Not that it makes any difference.  It still only loads the same record 20 times and the graphics still fail to 0pen.

0
 
Jason C. LevineNo oneCommented:
>>  Is it reflected in the code on the page?

Yes.  Above the <html> tag is all of the PHP code.  Cut and paste it here.
0
 
Jason C. LevineNo oneCommented:
The images are not present where you think they are:

http://www.aspectsandissues.com/vehpics/ab46.jpg

gives me a 404 error.  So your path is still wrong.
0
 
Dick_A_BarrettAuthor Commented:
Jason1178 has responded to other questions I've asked on EE.  As always, he is able to recognize the problem, express it concisely, and provide an understandable solution.  I couldn't be more satisfied.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

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