?
Solved

Dreamweaver: Using PHP to display multiples values across a 3x5 grid (think photo album)

Posted on 2008-11-08
19
Medium Priority
?
357 Views
Last Modified: 2013-12-13
I am designing an online portfolio for my website, and I want the results to be displayed in a table, such as a 3 column x 5 row grid (to show 15 samples).  Right now, the only thing I can get it to do is to display the same record in each column.  For example

PIC A  |  PIC A   | PIC A
PIC B  |  PIC B  |  PIC B

I want this:

PIC A  |  PIC B  |  PIC C
PIC D  |  PIC E  |  PIC F

I hope this makes sense.  I want the simplest solution; hopefully it's built into dreamweaver.
0
Comment
Question by:glorytohim36360
  • 9
  • 7
  • 2
  • +1
19 Comments
 
LVL 17

Expert Comment

by:nanharbison
ID: 22914030
This makes sense if you have the values stored in a database table. Do you have a query you can show us, which is not working as you want it to work yet? SInce you asked this question in the PHP and databases zone, this must involve a query, right?
0
 

Author Comment

by:glorytohim36360
ID: 22914114
Check out http://www.g2graphicsmore.com/main_portfolio.php.  I'm trying to get pictures and the text to go 3 columns wide x 5 rows.  

My queries are working fine; data is being pulled; put I want to put separate values into the columns, as well as the rows.
0
 

Author Comment

by:glorytohim36360
ID: 22914115

<?php require_once('Connections/g2_portfolio.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
 
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
 
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
 
$maxRows_portfolio_records = 15;
$pageNum_portfolio_records = 0;
if (isset($_GET['pageNum_portfolio_records'])) {
  $pageNum_portfolio_records = $_GET['pageNum_portfolio_records'];
}
$startRow_portfolio_records = $pageNum_portfolio_records * $maxRows_portfolio_records;
 
mysql_select_db($database_g2_portfolio, $g2_portfolio);
$query_portfolio_records = "SELECT * FROM portfolio_records";
$query_limit_portfolio_records = sprintf("%s LIMIT %d, %d", $query_portfolio_records, $startRow_portfolio_records, $maxRows_portfolio_records);
$portfolio_records = mysql_query($query_limit_portfolio_records, $g2_portfolio) or die(mysql_error());
$row_portfolio_records = mysql_fetch_assoc($portfolio_records);
 
if (isset($_GET['totalRows_portfolio_records'])) {
  $totalRows_portfolio_records = $_GET['totalRows_portfolio_records'];
} else {
  $all_portfolio_records = mysql_query($query_portfolio_records);
  $totalRows_portfolio_records = mysql_num_rows($all_portfolio_records);
}
$totalPages_portfolio_records = ceil($totalRows_portfolio_records/$maxRows_portfolio_records)-1;
?><html><!-- InstanceBegin template="/Templates/G2 Secondary Pages.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Nov2008 Secondary Page</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
	background-color: #84BAE8;
	margin-top: 5px;
}
.style1 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	color: #FFFFFF;
}
-->
</style>
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
.style2 {
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
	color: #2985C4;
}
.style3 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 10px;
}
.style6 {font-family: Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; }
-->
</style>
<!-- InstanceEndEditable -->
</head>
<body leftmargin="0" marginwidth="0">
<!-- ImageReady Slices (Nov2008 Secondary Page.psd) -->
<table width="850" height="197" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
<tr>
		<td colspan="6">
		  <img src="images/Nov2008-Secondary-Page_01.jpg" width="850" height="35" alt=""></td>
  </tr>
	<tr>
		<td>
		  <a href="index.html"><img src="images/Nov2008-Secondary-Page_02.jpg" alt="" width="151" height="162" border="0"></a></td>
<td>
	  <a href="about_g2.html"><img src="images/Nov2008-Secondary-Page_03.jpg" alt="" width="149" height="162" border="0"></a></td>
  <td>
	  <a href="port_magnews_1.html"><img src="images/Nov2008-Secondary-Page_04.jpg" alt="" width="169" height="162" border="0"></a></td>
<td>
	  <a href="media.html"><img src="images/Nov2008-Secondary-Page_05.jpg" alt="" width="158" height="162" border="0"></a></td>
  <td>
	  <a href="contact.html"><img src="images/Nov2008-Secondary-Page_06.jpg" alt="" width="151" height="162" border="0"></a></td>
<td>
	  <img src="images/Nov2008-Secondary-Page_07.jpg" width="72" height="162" alt=""><br></td>
	</tr>
	<tr>
	  <td colspan="6" bgcolor="#F7FBFE"><!-- InstanceBeginEditable name="Main Content" -->
	    <table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td colspan="2"><div align="right" class="style2">Portfolios &amp; Samples</div></td>
          </tr>
          <tr>
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td width="23%">&nbsp;</td>
            <td width="77%"><?php do { ?>
              <table width="100%" border="1" cellspacing="0" cellpadding="2">
                <tr>
                  <td width="34%" bordercolor="#FFFFFF" bgcolor="#CCCCCC"><div align="center"><img src="<?php echo $row_portfolio_records['thumbnail_pic']; ?>" alt="" width="200" height="200"><br>
                      <span class="style6"><?php echo $row_portfolio_records['client']; ?></span><br>
                      <span class="style3"><?php echo $row_portfolio_records['budget']; ?><br>
                      <?php echo $row_portfolio_records['comments']; ?></span><br>
                  </div></td>
                  <td width="34%" bordercolor="#FFFFFF" bgcolor="#CCCCCC"><div align="center"></div></td>
                  <td width="32%" bordercolor="#FFFFFF" bgcolor="#CCCCCC"><div align="center"></div></td>
                </tr>
                                </table>
                <?php } while ($row_portfolio_records = mysql_fetch_assoc($portfolio_records)); ?></td>
          </tr>
        </table>
	  <!-- InstanceEndEditable --></td>
  </tr>
	<tr>
	  <td colspan="6" bgcolor="#2985C4"><div align="center" class="style1">&copy;2008 G2 Graphics &amp; More. All rights reserved. <br>
	  PO Box 793 | Ozark AL 36361 | 866-813-6316 | gary@g2graphicsmore.com</div></td>
  </tr>
</table>
<br>
<!-- End ImageReady Slices -->
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($portfolio_records);
?>

Open in new window

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 20

Expert Comment

by:NerdsOfTech
ID: 22914132
This script also deals with blank columns left over from incomplete rows

Alter to your specs

=NerdsOfTech
<?php
// quick image maxcols table by NerdsOfTech
// user will need to set CONNECTION and SQL stetments
 
$maxcols = 5; // maximum columns changed for glorytohim36360 to 5 by N table
$count=0; // initialize count
 
// START CUSTOMIZATION. CHANGE THIS BELOW TO YOUR INFORMATION. MAKE $result your SQL query results
 
$tablename = 'Images';
$conn = mysqli_connect($host,$user,$password,$database)
or die ("couldn't connect to server");
        
$query = "SELECT * FROM $tablename";
$result = mysqli_query($conn, $query)
or die ("Couldn't execute query.");
 
// END CUSTOMIZATION
 
while ($row=mysqli_fetch_assoc($result))
{
$count++; // increment count
 
 if ($count == 1)
 { // initalize table
?>
 
<table width="600" border="0" align="center" cellspacing="0" cellpadding="0">
<tr>
 
<?
 }
 
// START CUSTOMIZATION. CELL Printout. Reference fields by $row['fieldname']
 
?>
 
<td align="center">
<A HREF="<? echo $row['url']; ?>" target="_blank"><IMG SRC="<? echo $row['url']; ?>" border="0" alt="<? echo $row['description']; ?>" width="150"></a>
</td>
 
<?
 
// END CUSTOMIZATION. CELL printout. Reference fields by $row['fieldname']
 
 if (!bcmod($count,$maxcols)) 
 { // if modulus of count is = 0 then end row
  echo '</tr><tr>'; 
 }
 
}
 
if ($count)
{ // data exists
 $fill = bcmod($count,$maxcols); // current column
 if ($fill){ // if not last column already fill in blank columns
  for ($i = $fill; $i <= ($maxcols -1); $i++){
   echo '<td>&nbsp;</td>';
  }
  echo '</tr>';
 }
 echo '</table>';
}
?>

Open in new window

0
 

Author Comment

by:glorytohim36360
ID: 22914144
Is there not an easier way to handle this - such as a next record option in dreamweaver or anything?
0
 
LVL 20

Expert Comment

by:NerdsOfTech
ID: 22914217
You have to use a modulus division nonetheless.
Count % 5

Here is my program flow above:

start table if data exist
print
check MOD for 0: false
print
check MOD for 0: false
print
check MOD for 0: false
print
check MOD for 0: false
print
check MOD for 0: true; break row start new row
...
check to see if last column is filled: false
print blank columns 5 minus x times
end last row
end table

I altered your code to reflect your output to match my code somewhat... see if this works:
<?php require_once('Connections/g2_portfolio.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
 
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
 
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
 
$maxRows_portfolio_records = 15;
$pageNum_portfolio_records = 0;
if (isset($_GET['pageNum_portfolio_records'])) {
  $pageNum_portfolio_records = $_GET['pageNum_portfolio_records'];
}
$startRow_portfolio_records = $pageNum_portfolio_records * $maxRows_portfolio_records;
 
mysql_select_db($database_g2_portfolio, $g2_portfolio);
$query_portfolio_records = "SELECT * FROM portfolio_records";
$query_limit_portfolio_records = sprintf("%s LIMIT %d, %d", $query_portfolio_records, $startRow_portfolio_records, $maxRows_portfolio_records);
$portfolio_records = mysql_query($query_limit_portfolio_records, $g2_portfolio) or die(mysql_error());
$row_portfolio_records = mysql_fetch_assoc($portfolio_records);
 
if (isset($_GET['totalRows_portfolio_records'])) {
  $totalRows_portfolio_records = $_GET['totalRows_portfolio_records'];
} else {
  $all_portfolio_records = mysql_query($query_portfolio_records);
  $totalRows_portfolio_records = mysql_num_rows($all_portfolio_records);
}
 
$totalPages_portfolio_records = ceil($totalRows_portfolio_records/$maxRows_portfolio_records)-1;
?><html><!-- InstanceBegin template="/Templates/G2 Secondary Pages.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Nov2008 Secondary Page</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
        background-color: #84BAE8;
        margin-top: 5px;
}
.style1 {
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-size: 9px;
        color: #FFFFFF;
}
-->
</style>
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
.style2 {
        font-family: Arial, Helvetica, sans-serif;
        font-weight: bold;
        color: #2985C4;
}
.style3 {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 10px;
}
.style6 {font-family: Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; }
-->
</style>
<!-- InstanceEndEditable -->
</head>
<body leftmargin="0" marginwidth="0">
<!-- ImageReady Slices (Nov2008 Secondary Page.psd) -->
 
 
 
 
<table width="850" height="197" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
<tr>
                <td colspan="6">
                  <img src="images/Nov2008-Secondary-Page_01.jpg" width="850" height="35" alt=""></td>
  </tr>
        <tr>
                <td>
                  <a href="index.html"><img src="images/Nov2008-Secondary-Page_02.jpg" alt="" width="151" height="162" border="0"></a></td>
<td>
          <a href="about_g2.html"><img src="images/Nov2008-Secondary-Page_03.jpg" alt="" width="149" height="162" border="0"></a></td>
  <td>
          <a href="port_magnews_1.html"><img src="images/Nov2008-Secondary-Page_04.jpg" alt="" width="169" height="162" border="0"></a></td>
<td>
          <a href="media.html"><img src="images/Nov2008-Secondary-Page_05.jpg" alt="" width="158" height="162" border="0"></a></td>
  <td>
          <a href="contact.html"><img src="images/Nov2008-Secondary-Page_06.jpg" alt="" width="151" height="162" border="0"></a></td>
<td>
          <img src="images/Nov2008-Secondary-Page_07.jpg" width="72" height="162" alt=""><br></td>
        </tr>
        <tr>
          <td colspan="6" bgcolor="#F7FBFE"><!-- InstanceBeginEditable name="Main Content" -->
            <table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td colspan="2"><div align="right" class="style2">Portfolios &amp; Samples</div></td>
          </tr>
          <tr>
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td width="23%">&nbsp;</td>
            <td width="77%">
<?php 
 
$maxcols = 5; // maximum columns
$count=0; // initialize count
 
while ($row_portfolio_records = mysql_fetch_assoc($portfolio_records)) { 
{
$count++; // increment count
 
 if ($count == 1)
 { // initalize table
?>
 
<table width="100%" border="0" align="center" cellspacing="0" cellpadding="0">
<tr>
 
<?
 }
 
// START CUSTOMIZATION. CELL Printout. Reference fields by $row_portfolio_records['fieldname']
 
?>
 
<td align="center">
              <table width="100%" border="1" cellspacing="0" cellpadding="2">
                <tr>
                  <td width="34%" bordercolor="#FFFFFF" bgcolor="#CCCCCC"><div align="center">
                      <img src="<?php echo $row_portfolio_records['thumbnail_pic']; ?>" alt="" width="200" height="200"><br>
                      <span class="style6"><?php echo $row_portfolio_records['client']; ?></span><br>
                      <span class="style3"><?php echo $row_portfolio_records['budget']; ?><br>
                      <?php echo $row_portfolio_records['comments']; ?></span><br>
                  </div>
                  </td>
                </tr>
              </table>
</td>
 
<?
 
// END CUSTOMIZATION. CELL printout. Reference fields by $row_portfolio_records['fieldname']
 
 if (!bcmod($count,$maxcols)) 
 { // if modulus of count is = 0 then end row
  echo '</tr><tr>'; 
 }
 
}
 
if ($count)
{ // data exists
 $fill = bcmod($count,$maxcols); // current column
 if ($fill){ // if not last column already fill in blank columns
  for ($i = $fill; $i <= ($maxcols -1); $i++){
   echo '<td> </td>';
  }
  echo '</tr>';
 }
 echo '</table>';
}
?>
 
 
 
           </td>
          </tr>
        </table>
 
 
 
 
          <!-- InstanceEndEditable --></td>
  </tr>
        <tr>
          <td colspan="6" bgcolor="#2985C4"><div align="center" class="style1">&copy;2008 G2 Graphics &amp; More. All rights reserved. <br>
          PO Box 793 | Ozark AL 36361 | 866-813-6316 | gary@g2graphicsmore.com</div></td>
  </tr>
</table>
<br>
<!-- End ImageReady Slices -->
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($portfolio_records);
?>

Open in new window

0
 

Author Comment

by:glorytohim36360
ID: 22914254
No luck: pasted the code to this php file:

http://www.g2graphicsmore.com/test2.php
0
 
LVL 20

Expert Comment

by:NerdsOfTech
ID: 22914269
1 syntax error fixed extra '{' removed
<?php require_once('Connections/g2_portfolio.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
 
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
 
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
 
$maxRows_portfolio_records = 15;
$pageNum_portfolio_records = 0;
if (isset($_GET['pageNum_portfolio_records'])) {
  $pageNum_portfolio_records = $_GET['pageNum_portfolio_records'];
}
$startRow_portfolio_records = $pageNum_portfolio_records * $maxRows_portfolio_records;
 
mysql_select_db($database_g2_portfolio, $g2_portfolio);
$query_portfolio_records = "SELECT * FROM portfolio_records";
$query_limit_portfolio_records = sprintf("%s LIMIT %d, %d", $query_portfolio_records, $startRow_portfolio_records, $maxRows_portfolio_records);
$portfolio_records = mysql_query($query_limit_portfolio_records, $g2_portfolio) or die(mysql_error());
$row_portfolio_records = mysql_fetch_assoc($portfolio_records);
 
if (isset($_GET['totalRows_portfolio_records'])) {
  $totalRows_portfolio_records = $_GET['totalRows_portfolio_records'];
} else {
  $all_portfolio_records = mysql_query($query_portfolio_records);
  $totalRows_portfolio_records = mysql_num_rows($all_portfolio_records);
}
 
$totalPages_portfolio_records = ceil($totalRows_portfolio_records/$maxRows_portfolio_records)-1;
?><html><!-- InstanceBegin template="/Templates/G2 Secondary Pages.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Nov2008 Secondary Page</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
        background-color: #84BAE8;
        margin-top: 5px;
}
.style1 {
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-size: 9px;
        color: #FFFFFF;
}
-->
</style>
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
.style2 {
        font-family: Arial, Helvetica, sans-serif;
        font-weight: bold;
        color: #2985C4;
}
.style3 {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 10px;
}
.style6 {font-family: Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; }
-->
</style>
<!-- InstanceEndEditable -->
</head>
<body leftmargin="0" marginwidth="0">
<!-- ImageReady Slices (Nov2008 Secondary Page.psd) -->
 
 
 
 
<table width="850" height="197" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
<tr>
                <td colspan="6">
                  <img src="images/Nov2008-Secondary-Page_01.jpg" width="850" height="35" alt=""></td>
  </tr>
        <tr>
                <td>
                  <a href="index.html"><img src="images/Nov2008-Secondary-Page_02.jpg" alt="" width="151" height="162" border="0"></a></td>
<td>
          <a href="about_g2.html"><img src="images/Nov2008-Secondary-Page_03.jpg" alt="" width="149" height="162" border="0"></a></td>
  <td>
          <a href="port_magnews_1.html"><img src="images/Nov2008-Secondary-Page_04.jpg" alt="" width="169" height="162" border="0"></a></td>
<td>
          <a href="media.html"><img src="images/Nov2008-Secondary-Page_05.jpg" alt="" width="158" height="162" border="0"></a></td>
  <td>
          <a href="contact.html"><img src="images/Nov2008-Secondary-Page_06.jpg" alt="" width="151" height="162" border="0"></a></td>
<td>
          <img src="images/Nov2008-Secondary-Page_07.jpg" width="72" height="162" alt=""><br></td>
        </tr>
        <tr>
          <td colspan="6" bgcolor="#F7FBFE"><!-- InstanceBeginEditable name="Main Content" -->
            <table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td colspan="2"><div align="right" class="style2">Portfolios &amp; Samples</div></td>
          </tr>
          <tr>
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td width="23%">&nbsp;</td>
            <td width="77%">
<?php 
 
$maxcols = 5; // maximum columns
$count=0; // initialize count
 
while ($row_portfolio_records = mysql_fetch_assoc($portfolio_records))
{
$count++; // increment count
 
 if ($count == 1)
 { // initalize table
?>
 
<table width="100%" border="0" align="center" cellspacing="0" cellpadding="0">
<tr>
 
<?
 }
 
// START CUSTOMIZATION. CELL Printout. Reference fields by $row_portfolio_records['fieldname']
 
?>
 
<td align="center">
              <table width="100%" border="1" cellspacing="0" cellpadding="2">
                <tr>
                  <td width="34%" bordercolor="#FFFFFF" bgcolor="#CCCCCC"><div align="center">
                      <img src="<?php echo $row_portfolio_records['thumbnail_pic']; ?>" alt="" width="200" height="200"><br>
                      <span class="style6"><?php echo $row_portfolio_records['client']; ?></span><br>
                      <span class="style3"><?php echo $row_portfolio_records['budget']; ?><br>
                      <?php echo $row_portfolio_records['comments']; ?></span><br>
                  </div>
                  </td>
                </tr>
              </table>
</td>
 
<?
 
// END CUSTOMIZATION. CELL printout. Reference fields by $row_portfolio_records['fieldname']
 
 if (!bcmod($count,$maxcols)) 
 { // if modulus of count is = 0 then end row
  echo '</tr><tr>'; 
 }
 
}
 
if ($count)
{ // data exists
 $fill = bcmod($count,$maxcols); // current column
 if ($fill){ // if not last column already fill in blank columns
  for ($i = $fill; $i <= ($maxcols -1); $i++){
   echo '<td> </td>';
  }
  echo '</tr>';
 }
 echo '</table>';
}
?>
 
 
 
           </td>
          </tr>
        </table>
 
 
 
 
          <!-- InstanceEndEditable --></td>
  </tr>
        <tr>
          <td colspan="6" bgcolor="#2985C4"><div align="center" class="style1">&copy;2008 G2 Graphics &amp; More. All rights reserved. <br>
          PO Box 793 | Ozark AL 36361 | 866-813-6316 | gary@g2graphicsmore.com</div></td>
  </tr>
</table>
<br>
<!-- End ImageReady Slices -->
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($portfolio_records);
?>

Open in new window

0
 

Author Comment

by:glorytohim36360
ID: 22914279
It's working now, but it's not pulling all of the records.  I've got three records, and it only displays two records.
0
 
LVL 20

Expert Comment

by:NerdsOfTech
ID: 22914374
Can you post up the one that is showing only 2 records so I see whats going on

ALSO

is it the first 2 or the last 2 showing?
0
 
LVL 20

Expert Comment

by:NerdsOfTech
ID: 22914384
debug output SQL copy/paste SQL output
<?php require_once('Connections/g2_portfolio.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
 
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
 
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
 
$maxRows_portfolio_records = 15;
$pageNum_portfolio_records = 0;
if (isset($_GET['pageNum_portfolio_records'])) {
  $pageNum_portfolio_records = $_GET['pageNum_portfolio_records'];
}
$startRow_portfolio_records = $pageNum_portfolio_records * $maxRows_portfolio_records;
 
mysql_select_db($database_g2_portfolio, $g2_portfolio);
$query_portfolio_records = "SELECT * FROM portfolio_records";
$query_limit_portfolio_records = sprintf("%s LIMIT %d, %d", $query_portfolio_records, $startRow_portfolio_records, $maxRows_portfolio_records);
 
 
echo $query_limit_portfolio_records; // debug: SQL
 
 
$portfolio_records = mysql_query($query_limit_portfolio_records, $g2_portfolio) or die(mysql_error());
$row_portfolio_records = mysql_fetch_assoc($portfolio_records);
 
if (isset($_GET['totalRows_portfolio_records'])) {
  $totalRows_portfolio_records = $_GET['totalRows_portfolio_records'];
} else {
  $all_portfolio_records = mysql_query($query_portfolio_records);
  $totalRows_portfolio_records = mysql_num_rows($all_portfolio_records);
}
 
$totalPages_portfolio_records = ceil($totalRows_portfolio_records/$maxRows_portfolio_records)-1;
?><html><!-- InstanceBegin template="/Templates/G2 Secondary Pages.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Nov2008 Secondary Page</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
        background-color: #84BAE8;
        margin-top: 5px;
}
.style1 {
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-size: 9px;
        color: #FFFFFF;
}
-->
</style>
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
.style2 {
        font-family: Arial, Helvetica, sans-serif;
        font-weight: bold;
        color: #2985C4;
}
.style3 {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 10px;
}
.style6 {font-family: Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; }
-->
</style>
<!-- InstanceEndEditable -->
</head>
<body leftmargin="0" marginwidth="0">
<!-- ImageReady Slices (Nov2008 Secondary Page.psd) -->
 
 
 
 
<table width="850" height="197" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
<tr>
                <td colspan="6">
                  <img src="images/Nov2008-Secondary-Page_01.jpg" width="850" height="35" alt=""></td>
  </tr>
        <tr>
                <td>
                  <a href="index.html"><img src="images/Nov2008-Secondary-Page_02.jpg" alt="" width="151" height="162" border="0"></a></td>
<td>
          <a href="about_g2.html"><img src="images/Nov2008-Secondary-Page_03.jpg" alt="" width="149" height="162" border="0"></a></td>
  <td>
          <a href="port_magnews_1.html"><img src="images/Nov2008-Secondary-Page_04.jpg" alt="" width="169" height="162" border="0"></a></td>
<td>
          <a href="media.html"><img src="images/Nov2008-Secondary-Page_05.jpg" alt="" width="158" height="162" border="0"></a></td>
  <td>
          <a href="contact.html"><img src="images/Nov2008-Secondary-Page_06.jpg" alt="" width="151" height="162" border="0"></a></td>
<td>
          <img src="images/Nov2008-Secondary-Page_07.jpg" width="72" height="162" alt=""><br></td>
        </tr>
        <tr>
          <td colspan="6" bgcolor="#F7FBFE"><!-- InstanceBeginEditable name="Main Content" -->
            <table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td colspan="2"><div align="right" class="style2">Portfolios &amp; Samples</div></td>
          </tr>
          <tr>
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td width="23%">&nbsp;</td>
            <td width="77%">
<?php 
 
$maxcols = 5; // maximum columns
$count=0; // initialize count
 
while ($row_portfolio_records = mysql_fetch_assoc($portfolio_records))
{
$count++; // increment count
 
 if ($count == 1)
 { // initalize table
?>
 
<table width="100%" border="0" align="center" cellspacing="0" cellpadding="0">
<tr>
 
<?
 }
 
// START CUSTOMIZATION. CELL Printout. Reference fields by $row_portfolio_records['fieldname']
 
?>
 
<td align="center">
              <table width="100%" border="1" cellspacing="0" cellpadding="2">
                <tr>
                  <td width="34%" bordercolor="#FFFFFF" bgcolor="#CCCCCC"><div align="center">
                      <img src="<?php echo $row_portfolio_records['thumbnail_pic']; ?>" alt="" width="200" height="200"><br>
                      <span class="style6"><?php echo $row_portfolio_records['client']; ?></span><br>
                      <span class="style3"><?php echo $row_portfolio_records['budget']; ?><br>
                      <?php echo $row_portfolio_records['comments']; ?></span><br>
                  </div>
                  </td>
                </tr>
              </table>
</td>
 
<?
 
// END CUSTOMIZATION. CELL printout. Reference fields by $row_portfolio_records['fieldname']
 
 if (!bcmod($count,$maxcols)) 
 { // if modulus of count is = 0 then end row
  echo '</tr><tr>'; 
 }
 
}
 
if ($count)
{ // data exists
 $fill = bcmod($count,$maxcols); // current column
 if ($fill){ // if not last column already fill in blank columns
  for ($i = $fill; $i <= ($maxcols -1); $i++){
   echo '<td> </td>';
  }
  echo '</tr>';
 }
 echo '</table>';
}
?>
 
 
 
           </td>
          </tr>
        </table>
 
 
 
 
          <!-- InstanceEndEditable --></td>
  </tr>
        <tr>
          <td colspan="6" bgcolor="#2985C4"><div align="center" class="style1">&copy;2008 G2 Graphics &amp; More. All rights reserved. <br>
          PO Box 793 | Ozark AL 36361 | 866-813-6316 | gary@g2graphicsmore.com</div></td>
  </tr>
</table>
<br>
<!-- End ImageReady Slices -->
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($portfolio_records);
?>

Open in new window

0
 

Author Comment

by:glorytohim36360
ID: 22914410
http://www.g2graphicsmore.com/test2.php

it's the latest 2 records that's showing.  the first one is not showing.
0
 
LVL 20

Expert Comment

by:NerdsOfTech
ID: 22914429
More debug replace file
<?php require_once('Connections/g2_portfolio.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
 
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
 
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
 
$maxRows_portfolio_records = 15;
$pageNum_portfolio_records = 0;
if (isset($_GET['pageNum_portfolio_records'])) {
  $pageNum_portfolio_records = $_GET['pageNum_portfolio_records'];
}
$startRow_portfolio_records = $pageNum_portfolio_records * $maxRows_portfolio_records;
 
mysql_select_db($database_g2_portfolio, $g2_portfolio);
$query_portfolio_records = "SELECT * FROM portfolio_records";
$query_limit_portfolio_records = sprintf("%s LIMIT %d, %d", $query_portfolio_records, $startRow_portfolio_records, $maxRows_portfolio_records);
 
 
echo $query_limit_portfolio_records; // debug: SQL
 
 
$portfolio_records = mysql_query($query_limit_portfolio_records, $g2_portfolio) or die(mysql_error());
$row_portfolio_records = mysql_fetch_assoc($portfolio_records);
 
if (isset($_GET['totalRows_portfolio_records'])) {
  $totalRows_portfolio_records = $_GET['totalRows_portfolio_records'];
} else {
  $all_portfolio_records = mysql_query($query_portfolio_records);
  $totalRows_portfolio_records = mysql_num_rows($all_portfolio_records);
}
 
$totalPages_portfolio_records = ceil($totalRows_portfolio_records/$maxRows_portfolio_records)-1;
?><html><!-- InstanceBegin template="/Templates/G2 Secondary Pages.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Nov2008 Secondary Page</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
        background-color: #84BAE8;
        margin-top: 5px;
}
.style1 {
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-size: 9px;
        color: #FFFFFF;
}
-->
</style>
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
.style2 {
        font-family: Arial, Helvetica, sans-serif;
        font-weight: bold;
        color: #2985C4;
}
.style3 {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 10px;
}
.style6 {font-family: Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; }
-->
</style>
<!-- InstanceEndEditable -->
</head>
<body leftmargin="0" marginwidth="0">
<!-- ImageReady Slices (Nov2008 Secondary Page.psd) -->
 
 
 
 
<table width="850" height="197" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
<tr>
                <td colspan="6">
                  <img src="images/Nov2008-Secondary-Page_01.jpg" width="850" height="35" alt=""></td>
  </tr>
        <tr>
                <td>
                  <a href="index.html"><img src="images/Nov2008-Secondary-Page_02.jpg" alt="" width="151" height="162" border="0"></a></td>
<td>
          <a href="about_g2.html"><img src="images/Nov2008-Secondary-Page_03.jpg" alt="" width="149" height="162" border="0"></a></td>
  <td>
          <a href="port_magnews_1.html"><img src="images/Nov2008-Secondary-Page_04.jpg" alt="" width="169" height="162" border="0"></a></td>
<td>
          <a href="media.html"><img src="images/Nov2008-Secondary-Page_05.jpg" alt="" width="158" height="162" border="0"></a></td>
  <td>
          <a href="contact.html"><img src="images/Nov2008-Secondary-Page_06.jpg" alt="" width="151" height="162" border="0"></a></td>
<td>
          <img src="images/Nov2008-Secondary-Page_07.jpg" width="72" height="162" alt=""><br></td>
        </tr>
        <tr>
          <td colspan="6" bgcolor="#F7FBFE"><!-- InstanceBeginEditable name="Main Content" -->
            <table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td colspan="2"><div align="right" class="style2">Portfolios &amp; Samples</div></td>
          </tr>
          <tr>
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td width="23%">&nbsp;</td>
            <td width="77%">
<?php 
 
$maxcols = 5; // maximum columns
$count=0; // initialize count
 
//debug
echo '<br>' . $portfolio_records . '<br>';
$row = mysql_fetch_assoc($portfolio_records);
print_h $row;
 
 
while ($row_portfolio_records = mysql_fetch_assoc($portfolio_records))
{
$count++; // increment count
 
 if ($count == 1)
 { // initalize table
?>
 
<table width="100%" border="0" align="center" cellspacing="0" cellpadding="0">
<tr>
 
<?
 }
 
// START CUSTOMIZATION. CELL Printout. Reference fields by $row_portfolio_records['fieldname']
 
?>
 
<td align="center">
              <table width="100%" border="1" cellspacing="0" cellpadding="2">
                <tr>
                  <td width="34%" bordercolor="#FFFFFF" bgcolor="#CCCCCC"><div align="center">
                      <img src="<?php echo $row_portfolio_records['thumbnail_pic']; ?>" alt="" width="200" height="200"><br>
                      <span class="style6"><?php echo $row_portfolio_records['client']; ?></span><br>
                      <span class="style3"><?php echo $row_portfolio_records['budget']; ?><br>
                      <?php echo $row_portfolio_records['comments']; ?></span><br>
                  </div>
                  </td>
                </tr>
              </table>
</td>
 
<?
 
// END CUSTOMIZATION. CELL printout. Reference fields by $row_portfolio_records['fieldname']
 
 if (!bcmod($count,$maxcols)) 
 { // if modulus of count is = 0 then end row
  echo '</tr><tr>'; 
 }
 
}
 
if ($count)
{ // data exists
 $fill = bcmod($count,$maxcols); // current column
 if ($fill){ // if not last column already fill in blank columns
  for ($i = $fill; $i <= ($maxcols -1); $i++){
   echo '<td> </td>';
  }
  echo '</tr>';
 }
 echo '</table>';
}
?>
 
 
 
           </td>
          </tr>
        </table>
 
 
 
 
          <!-- InstanceEndEditable --></td>
  </tr>
        <tr>
          <td colspan="6" bgcolor="#2985C4"><div align="center" class="style1">&copy;2008 G2 Graphics &amp; More. All rights reserved. <br>
          PO Box 793 | Ozark AL 36361 | 866-813-6316 | gary@g2graphicsmore.com</div></td>
  </tr>
</table>
<br>
<!-- End ImageReady Slices -->
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($portfolio_records);
?>

Open in new window

0
 
LVL 20

Expert Comment

by:NerdsOfTech
ID: 22914438
Oops try this instead...
<?php require_once('Connections/g2_portfolio.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
 
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
 
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
 
$maxRows_portfolio_records = 15;
$pageNum_portfolio_records = 0;
if (isset($_GET['pageNum_portfolio_records'])) {
  $pageNum_portfolio_records = $_GET['pageNum_portfolio_records'];
}
$startRow_portfolio_records = $pageNum_portfolio_records * $maxRows_portfolio_records;
 
mysql_select_db($database_g2_portfolio, $g2_portfolio);
$query_portfolio_records = "SELECT * FROM portfolio_records";
$query_limit_portfolio_records = sprintf("%s LIMIT %d, %d", $query_portfolio_records, $startRow_portfolio_records, $maxRows_portfolio_records);
 
 
echo $query_limit_portfolio_records; // debug: SQL
 
 
$portfolio_records = mysql_query($query_limit_portfolio_records, $g2_portfolio) or die(mysql_error());
$row_portfolio_records = mysql_fetch_assoc($portfolio_records);
 
if (isset($_GET['totalRows_portfolio_records'])) {
  $totalRows_portfolio_records = $_GET['totalRows_portfolio_records'];
} else {
  $all_portfolio_records = mysql_query($query_portfolio_records);
  $totalRows_portfolio_records = mysql_num_rows($all_portfolio_records);
}
 
$totalPages_portfolio_records = ceil($totalRows_portfolio_records/$maxRows_portfolio_records)-1;
?><html><!-- InstanceBegin template="/Templates/G2 Secondary Pages.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Nov2008 Secondary Page</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
        background-color: #84BAE8;
        margin-top: 5px;
}
.style1 {
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-size: 9px;
        color: #FFFFFF;
}
-->
</style>
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
.style2 {
        font-family: Arial, Helvetica, sans-serif;
        font-weight: bold;
        color: #2985C4;
}
.style3 {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 10px;
}
.style6 {font-family: Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; }
-->
</style>
<!-- InstanceEndEditable -->
</head>
<body leftmargin="0" marginwidth="0">
<!-- ImageReady Slices (Nov2008 Secondary Page.psd) -->
 
 
 
 
<table width="850" height="197" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
<tr>
                <td colspan="6">
                  <img src="images/Nov2008-Secondary-Page_01.jpg" width="850" height="35" alt=""></td>
  </tr>
        <tr>
                <td>
                  <a href="index.html"><img src="images/Nov2008-Secondary-Page_02.jpg" alt="" width="151" height="162" border="0"></a></td>
<td>
          <a href="about_g2.html"><img src="images/Nov2008-Secondary-Page_03.jpg" alt="" width="149" height="162" border="0"></a></td>
  <td>
          <a href="port_magnews_1.html"><img src="images/Nov2008-Secondary-Page_04.jpg" alt="" width="169" height="162" border="0"></a></td>
<td>
          <a href="media.html"><img src="images/Nov2008-Secondary-Page_05.jpg" alt="" width="158" height="162" border="0"></a></td>
  <td>
          <a href="contact.html"><img src="images/Nov2008-Secondary-Page_06.jpg" alt="" width="151" height="162" border="0"></a></td>
<td>
          <img src="images/Nov2008-Secondary-Page_07.jpg" width="72" height="162" alt=""><br></td>
        </tr>
        <tr>
          <td colspan="6" bgcolor="#F7FBFE"><!-- InstanceBeginEditable name="Main Content" -->
            <table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td colspan="2"><div align="right" class="style2">Portfolios &amp; Samples</div></td>
          </tr>
          <tr>
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td width="23%">&nbsp;</td>
            <td width="77%">
<?php 
 
$maxcols = 5; // maximum columns
$count=0; // initialize count
 
//debug
echo '<br>' . $portfolio_records . '<br>';
$row = mysql_fetch_assoc($portfolio_records);
print_r $row;
 
 
while ($row_portfolio_records = mysql_fetch_assoc($portfolio_records))
{
$count++; // increment count
 
 if ($count == 1)
 { // initalize table
?>
 
<table width="100%" border="0" align="center" cellspacing="0" cellpadding="0">
<tr>
 
<?
 }
 
// START CUSTOMIZATION. CELL Printout. Reference fields by $row_portfolio_records['fieldname']
 
?>
 
<td align="center">
              <table width="100%" border="1" cellspacing="0" cellpadding="2">
                <tr>
                  <td width="34%" bordercolor="#FFFFFF" bgcolor="#CCCCCC"><div align="center">
                      <img src="<?php echo $row_portfolio_records['thumbnail_pic']; ?>" alt="" width="200" height="200"><br>
                      <span class="style6"><?php echo $row_portfolio_records['client']; ?></span><br>
                      <span class="style3"><?php echo $row_portfolio_records['budget']; ?><br>
                      <?php echo $row_portfolio_records['comments']; ?></span><br>
                  </div>
                  </td>
                </tr>
              </table>
</td>
 
<?
 
// END CUSTOMIZATION. CELL printout. Reference fields by $row_portfolio_records['fieldname']
 
 if (!bcmod($count,$maxcols)) 
 { // if modulus of count is = 0 then end row
  echo '</tr><tr>'; 
 }
 
}
 
if ($count)
{ // data exists
 $fill = bcmod($count,$maxcols); // current column
 if ($fill){ // if not last column already fill in blank columns
  for ($i = $fill; $i <= ($maxcols -1); $i++){
   echo '<td> </td>';
  }
  echo '</tr>';
 }
 echo '</table>';
}
?>
 
 
 
           </td>
          </tr>
        </table>
 
 
 
 
          <!-- InstanceEndEditable --></td>
  </tr>
        <tr>
          <td colspan="6" bgcolor="#2985C4"><div align="center" class="style1">&copy;2008 G2 Graphics &amp; More. All rights reserved. <br>
          PO Box 793 | Ozark AL 36361 | 866-813-6316 | gary@g2graphicsmore.com</div></td>
  </tr>
</table>
<br>
<!-- End ImageReady Slices -->
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($portfolio_records);
?>

Open in new window

0
 
LVL 20

Expert Comment

by:NerdsOfTech
ID: 22914446
I'll post back tommorrow try the last answer first to debug
0
 
LVL 20

Assisted Solution

by:NerdsOfTech
NerdsOfTech earned 400 total points
ID: 22914451
Please replace the same url so I can see it
0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 1600 total points
ID: 22915059
FYI,

There is a free extension for Dreamweaver that handles horizontal looping:

http://www.tom-muck.com/extensions/help/HorizontalLooper/
0
 

Accepted Solution

by:
glorytohim36360 earned 0 total points
ID: 22916257
Jason,

I had originally tried that, and it didn't work.  However, I tried it again, but this time, I detached the template from the page, and it worked beautifully!  You'll have to resize the tables after using it, but it works great.

Thanks,

Gary
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 22928202
The template was preventing some needed code from being written.

Also, when closing questions that the Experts answer, you use the "Accept Multiple Solutions' button in any Expert post to split points.  Right now, you are telling everyone that you solved the question yourself, but are giving us points anyway...
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses
Course of the Month16 days, 18 hours left to enroll

864 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