Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Dreamweaver won't cooperate

Posted on 2009-03-31
7
Medium Priority
?
909 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
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

 

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 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

721 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