Totally understand.
In case it helps, this would be the msql version for the RS
<?php
$colname_RSNamePerm = "-1";
if (isset($_GET['perm'])) {
$colname_RSNamePerm = $_GET['perm'];
}
$colname_RSName = "-1";
if (isset($_GET['id'])) {
$colname_RSName = $_GET['id'];
}
mysql_select_db($database_DBConnection, $DBConnection);
$query_RSName = sprintf("SELECT * FROM table_name WHERE KeyColumnID= %s OR Permalink = %s1", GetSQLValueString($colname_RSName, "text"),GetSQLValueString($colname_RSNamePerm, "text"));
$RSName = mysql_query($query_RSName, $DBConnection) or die(mysql_error());
$row_RSName = mysql_fetch_assoc($RSName);
$totalRows_RSName = mysql_num_rows($RSName);
?>