I'm having a lot of trouble with PHP Master Pages Detail Set in MX 2004 Testing page here. On pressing the link on the left, the value is passing to the pop up window [visible at the top bar], but I'm getting an error on the actual record item "Unknown column 'BR' in 'where clause'" These catalog values for items have a value like:
BR-13-02 . It appears that the post page is picking up the item ID, the record ID, and getting hammered by the initial value in the string. I've used Encoding and tried to protect against perhaps the error of a misunderstood hyphen, but it doesn't appear to help. It was suggested I seek help here.
// Initial page code
<td align="center"><a href="whatsup.php?recordID =<?php echo $row_Recordset1['item']; ?>"> <?php echo urlencode($row_Recordset1['item']); ?> </a> </td>
<td align="center"><?php echo $row_Reco rdset1['item_name']; ?> </td>
//and here is the popup page's code whose qu ery cannot find a value for $recordID:
<?php require_once('Connections/jodenonline.php'); ?><?php
$maxRows_DetailRS1 = 1;
$pageNum_DetailRS1 = 0;
if (isset($_GET['pageNum_DetailRS1'])) {
$pageNum_DetailRS1 = $_GET['pageNum_DetailRS1'];
}
$startRow_DetailRS1 = $pageNum_DetailRS1 * $ma xRows_DetailRS1;
mysql_select_db($database_jodenonline, $jodenonli ne);
$query_DetailRS1 = "SELECT* FROM `Catalog` WHERE `Catalog`.item = $recordID";
$query_limit_DetailRS1 = sprintf("%s LIMIT %d, %d", $query_DetailRS1, $startRow_DetailRS1, $ maxRows_DetailRS1);
$DetailRS1 = mysql_query($query_limit_DetailRS1, $jodenonline) or die(mysql_error());
$row_DetailRS1 = mysql_fetch_assoc($DetailRS1);
if (isset($_GET['totalRows_DetailRS1'])) {
$totalRows_DetailRS1 = $_GET['totalRows_DetailRS1'];
} else {
$all_DetailRS1 = mysql_query($query_DetailRS 1);
$totalRows_DetailRS1 = mysql_num_rows($all_D etailRS1);
}
$totalPages_DetailRS1 = ceil($totalRows_DetailRS 1/$maxRows_DetailRS1)-1;
$colname_Recordset1 = "1";
if (isset($_GET['recordID'])) {
$colname_Recordset1 = (get_magic_quotes_gpc( )) ? $_GET['recordID'] : addslashes($_GET['recordID']);
}
mysql_select_db($database_jodenonline, $jodenonli ne);
$query_Recordset1 = sprintf("SELECT * FROM `C atalog` WHERE item = '%s'", $colname_Recordse t1);
$Recordset1 = mysql_query($query_Recordset1, $j odenonline) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1) ;
$totalRows_Recordset1 = mysql_num_rows($Recordse t1);
~~~~~~~~~~~~~
I'd rather be drawing...
http://www.designswonders.com