Drill Down Problems

Drill Down Problems

jstensonjstenson Posts: 3Questions: 0Answers: 0
edited November 2012 in General
This is a long shot but I'll take any help that I can get cause I feel like I've tried everything and know it is going to be something simple I'm missing. I've got two problems one is there's two search bars for the table and the second is the columns do not match. Here is a print screen of my code: <?php
//Set no caching
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

if (isset($_REQUEST["type"])) { $type = $_REQUEST["type"]; } else { $type = "ANY"; }

include "./includes/navbar.php";
include "./connect.php";
$referer = $_SERVER["HTTP_REFERER"];
?>


Tag Cloud Browsing
@import url("css/navbar.css");
@import url("css/main.css");
@import url("css/tagcloud.css");
@import url("css/ui.all.css");





function fnFormatDetails (oTable, nTr )
{
var aData = oTable.fnGetData( nTr );
var sOut = '';
sOut += 'Rendering engine:'+aData[1]+' '+aData[4]+'';
sOut += 'Link to source:Could provide a link here';
sOut += 'Extra info:And any further details here (images etc)';
sOut += '';
return sOut;
}

$(document).ready(function() {
$('#results').dataTable( {
"bInfo": false,
"sPaginationType": "full_numbers",
"iDisplayLength": 25,
"aoData": [
null,
{ "sType": "html" },
{ "sType": "html" },
{ "sType": "html" },
{ "sType": "html" }

],
// sort default set by Term
"aaSorting": [[0, "asc" ]]
} );
$("#tabs").tabs();

/* * Insert a 'details' column to the table */
var nCloneTh = document.createElement( 'th' );
var nCloneTd = document.createElement( 'td' );
nCloneTd.innerHTML = '';
nCloneTd.className = "center";

$('#results thead tr').each( function () {
this.insertBefore( nCloneTh, this.childNodes[0] );
} );

$('#results tbody tr').each( function () {
this.insertBefore( nCloneTd.cloneNode( true ), this.childNodes[0] );
} );

/* * Initialse DataTables, with no sorting on the 'details' column */
var oTable = $('#results').dataTable( {
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [ 0 ] }
],
"aaSorting": [[1, 'asc']]
});

/* Add event listener for opening and closing details
* Note that the indicator for showing which row is open is not controlled by DataTables,
* rather it is done here */

$('#results tbody td img').live('click', function () {
var nTr = $(this).parents('tr')[0];
document.write(this);
if ( oTable.fnIsOpen(nTr) ) {
/* This row is already open - close it */
this.src = "images/details_open.png";
oTable.fnClose( nTr );
}
else
{
/* Open this row */
this.src = "images/details_closed.png";
oTable.fnOpen( nTr, fnFormatDetails(oTable, nTr), 'details' );
}
} );
} );

function searchBack() {
<?php
echo "document.location.href = \"index.php?search=$search&type=$type\";";
?>
}





<!-- -->
Data Dictionary

<?php

$sql = "select term, department, acronym, criteria, notes\n";
$sql .= "from misdatadictionary.tbldatadictionaryindex\n";
$r = pg_query($dbc, $sql);
if (!r) {
die(pg_last_error());
exit;
}
$recs = pg_num_rows($r);
?>



Any (<?php echo $recs;?>)
Definition (<?php echo $def_recs;?>)
Awareness (<?php echo $awa_recs;?>)
Integrity (<?php echo $int_recs;?>)









Term   
Department   
Acronym   
Criteria   
Notes   




<?php
while ($rs = pg_fetch_row($r)) {
list($term,$department,$acronym,$criteria,$notes) = $rs;
echo "$term";
if ($isadmin || $isuser) {
echo "$department";
} else {
echo "$department";
}
echo "$acronym  ";
echo "$criteria  ";
echo "$notes  \n";
$rows++;
}
?>
This discussion has been closed.