Forums
This topic is locked
New Recordset based on varible from another RS
Posted 23 Sep 2003 18:09:32
1
has voted
23 Sep 2003 18:09:32 Jeremy Cornelius posted:
Ok, I'm using PHAkt 2.5.0 and Dreamweaver 6.1. I'm trying to query a table based on a varible from the first recordset. The first recordset get's it varible(s) from the URL. Here's my code created by PHakt
// begin Recordset
$KTParam1__Recordset1 = '-1';
if (isset($HTTP_GET_VARS['recordID'])) {
$KTParam1__Recordset1 = $HTTP_GET_VARS['recordID'];
}
$query_Recordset1 = sprintf("SELECT * FROM shows WHERE id = %s", $KTParam1__Recordset1);
$Recordset1 = $phkat->SelectLimit($query_Recordset1) or die($phkat->ErrorMsg());
$totalRows_Recordset1 = $Recordset1->RecordCount();
// end Recordset
// begin Recordset
$colname__RSVenues = '-1';
if (isset($row__Recordset1['venueid'])) {
$colname__RSVenues = $row__Recordset1['venueid'];
}
$query_RSVenues = sprintf("SELECT * FROM venues WHERE venueid = '%s'", $colname__RSVenues);
$RSVenues = $phkat->SelectLimit($query_RSVenues) or die($phkat->ErrorMsg());
$totalRows_RSVenues = $RSVenues->RecordCount();
// end Recordset
Thanks