<?
$query = "SELECT * FROM venting WHERE ID = '2'";
$result = mysql_query($query) or die('Error, query failed: ' . mysql_error());
While ($myrow = mysql_fetch_row($result))
{
$id = $myrow[1];
$productname = $myrow[5];
$grouptitle = $myrow[6];
$groupsubtitle = $myrow[7];
$contenttitle1 = $myrow[8];
$content1 = $myrow[9];
$contenttitle2 = $myrow[10];
$content2 = $myrow[11];
$subtitle1 = $myrow[12];
$subtitle2 = $myrow[13];
$subtitle3 = $myrow[14];
$bartitle1 = $myrow[15];
$bartitle2 = $myrow[16];
$bartitle3 = $myrow[17];
$reference = $myrow[18];
$bulletcontent1 = $myrow[19];
$bulletcontent2 = $myrow[20];
}
echo str_replace(Chr(13), "<br>", ("<h1>$grouptitle $groupsubtitle</h1>
<h3>$contenttitle1</h3>
$content1 <BR><BR>
<h3>$bartitle1</h3>
$content2<BR /><BR />
<em>$reference</em>
"));
?>
This works fine if I wanted to call each row individually ( WHERE ID = '2') I was trying to get away with not having to call each row thereby repeating the entire query statement each time I need a new row. I thought since the intial query actually stores the entire contents there had to be a way to access that at will instead of a table build style loop . . .
A little background, this is a product site that contains well over 100 pages. All taken from a database we have connected with a quark xpress catalog. The tables in MySQL were designed around the way the catalog had to be pulled into the doc. Which poses difficulties for me on the web side. They have now come back and said they want each product category page to contain all the pages of the catalog that pertain to it. I was planning on just doing includes since the pages were pretty much finished as above. The problem, in IE using anchor tags to link to an include breaks the pages, so I will have to do the entire long page.