Solved

Dreamweaver won't cooperate

Posted on 2009-03-31
7
906 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

733 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