Colname not working
Hello Ray
I have a simple list and details page.
The list seems OK and when I hover over a record number the url shows
correctly at the bottom right hand of the page.
However when I click the link to the details page
I get the correct url http://localhost/boatsforsalenow_mysqli/categories/details.php?11791=11791 but the page remains blank.
Have you an idea why this could be?
Thanks
John
List.php
========
<?php require_once('../Connections/conn1_i.php'); ?>
<?php require_once('../webassist/mysqli/rsobj.php'); ?>
<?php
$rsCanalBoatList = new WA_MySQLi_RS("rsCanalBoatList",$conn1_i,0);
$rsCanalBoatList->setQuery("SELECT RecNo, Manufacturer, Model, Image1_250 FROM boats WHERE Category1 = 'Canal Boats'");
$rsCanalBoatList->execute();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<p>List Canal Boats </p>
<?php
$wa_startindex = 0;
while(!$rsCanalBoatList->atEnd()) {
$wa_startindex = $rsCanalBoatList->Index;
?>
<p><a href="details.php?<?php echo($rsCanalBoatList->getColumnVal("RecNo")); ?>=<?php echo($rsCanalBoatList->getColumnVal("RecNo")); ?>"><?php echo($rsCanalBoatList->getColumnVal("RecNo")); ?></a><?php echo($rsCanalBoatList->getColumnVal("Manufacturer")); ?><?php echo($rsCanalBoatList->getColumnVal("Model")); ?><a href="details.php"><img src="../BoatImages/<?php echo($rsCanalBoatList->getColumnVal("Image1_250")); ?>" alt="Canal Boats" /></a></p>
<?php
$rsCanalBoatList->moveNext();
}
$rsCanalBoatList->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
?>
</body>
</html>
==================
Details.php
===========
<?php require_once('../Connections/conn1_i.php'); ?>
<?php require_once('../webassist/mysqli/rsobj.php'); ?>
<?php
$rsCanalBoatDetails = new WA_MySQLi_RS("rsCanalBoatDetails",$conn1_i,100);
$rsCanalBoatDetails->setQuery("SELECT boats.RecNo, boats.RegDate, boats.Company, boats.Manufacturer, boats.Model, boats.BuildDate, boats.NeworUsed, boats.Category1, boats.HullMaterial, boats.`Engines`, boats.LOA, boats.image1_900 FROM boats WHERE boats.RecNo = ?");
$rsCanalBoatDetails->bindParam("i", "".($rsCanalBoatDetails->getColumnVal("RecNo")) ."", "-1"); //WAQB_Param1
$rsCanalBoatDetails->execute();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<p>Details <br />
<?php echo($rsCanalBoatDetails->getColumnVal("RecNo")); ?><br />
<?php echo($rsCanalBoatDetails->getColumnVal("Manufacturer")); ?><br />
<?php echo($rsCanalBoatDetails->getColumnVal("Model")); ?><br />
<?php echo($rsCanalBoatDetails->getColumnVal("BuildDate")); ?></p>
</body>
</html>