Solved

Dreamweaver won't cooperate

Posted on 2009-03-31
7
902 Views
Last Modified: 2012-05-06
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
Comment
Question by:Dick_A_Barrett
  • 4
  • 3
7 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24035029
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
 

Author Comment

by:Dick_A_Barrett
ID: 24035122
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
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24035178
No, that data looks okay.  What does the SQL query look like?
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:Dick_A_Barrett
ID: 24035408
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
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24035621
>>  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
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
ID: 24035631
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
 

Author Closing Comment

by:Dick_A_Barrett
ID: 31565123
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

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now