Location: PHPKode > projects > Katropine DBmanager > sqlresult.php
<?php
	$bla = Controller::__sqlresoult();
	$pg = $bla['pg'];
	$sql = $bla['sql'];
	$total = $bla['total'];
	$new_bla = $bla['data'];
?>
<?php if($bla['layout'] == 1): ?>

	<table width="100%" cellpadding="5" cellspacing="0" border="0"  class="default">
	<tr class="tbl_title"> 
		<td id="borders">Query: (Rows: <?php echo $bla['mysql_num_rows'];?> of Total Rows: <?php echo (is_numeric($total))? $total: $bla['mysql_num_rows'];?>, Query took: <?php echo $bla['mysql_query_time'];?> sec)</td>
	</tr>
	<tr>
		<td id="borders"><b><?php echo $sql;?></b></td>
	</tr>
	</table>
	<br />
<?php if($_REQUEST['autosql'] == 'browse'): ?>
<!--PAGIGNG ############################################################################################################-->
<div id="paging">
	Total pages: <?php echo $pg['end'];?>
	<a href="<?php echo $_SERVER['PHP_SELF']."?action=dbmanager&function=sqlresult&autosql=browse&table=".$_REQUEST['table']."&page=".$pg['first'];?>" title="Go to First Page" class="first">&laquo;</a>
	<a href="<?php echo $_SERVER['PHP_SELF']."?action=dbmanager&function=sqlresult&autosql=browse&table=".$_REQUEST['table']."&page=".$pg['prev'];?>" title="Go to Previous Page" class="prev">&lsaquo;</a>
	<?php  for ($i=$pg['start'];$i<=$pg['end'];$i++) : ?>
		<?php  if ($i==$pg['page']) $current = 'current'; else $current="";?>
		<a href="<?php echo $_SERVER['PHP_SELF']."?action=dbmanager&function=sqlresult&autosql=browse&table=".$_REQUEST['table']."&page=".$i;?>" title="Go to Page <?php echo $i;?>" id="page<?php echo $current;?>"><?php echo $i;?></a>
	<?php  endfor; ?>
	<a href="<?php echo $_SERVER['PHP_SELF']."?action=dbmanager&function=sqlresult&autosql=browse&table=".$_REQUEST['table']."&page=".$pg['next'];?>" title="Go to Next Page" class="next">&rsaquo;</a>
	<a href="<?php echo $_SERVER['PHP_SELF']."?action=dbmanager&function=sqlresult&autosql=browse&table=".$_REQUEST['table']."&page=".$pg['last'];?>" title="Go to Last Page" class="last">&raquo;</a>
</div>
<!--PAGIGNG ############################################################################################################-->		
<?php endif;?>
<br />
	<table width="100%" cellpadding="2" cellspacing="0" border="0"  class="default">
	<?php if($bla['sql_action'] == "select"):?>
	<?php if ($bla['mysql_num_rows']>0): ?>
	<tr class="tbl_title"> 
		<?php foreach(array_keys($new_bla[0]) as $key): ?> 
	    	<td id="borders"><?php echo $key;?></td>
	    <?php endforeach;?> 
	</tr> 
	    <?php foreach ($new_bla as $k): ?> 
	<tr>
	     	<?php foreach ($k as $data): ?> 
		<td id="borders" align="center"><?php echo $data;?></td> 
	      	<?php endforeach;?> 
	   
	</tr> 
	 <?php endforeach;?> 
	 <?php else: ?> 
	<tr>
		<td id="borders">No Results found!</td>
	</tr> 
	<?php endif;?> 
	<?php endif;?> 
	<?php if($bla['error']):?>
	<tr>
		<td id="borders"><?php echo $bla['errormsg'];?></td>
	</tr> 
	<?php endif;?>
	</table> 
	
<?php endif; ?>
<?php if($bla['layout'] == 2): ?>
	<table width="100%" cellpadding="2" cellspacing="0" border="0"  class="default">
	<?php foreach ($new_bla as $data): ?> 
		<tr><td id="borders" align="left"><?php echo $data;?></td> </tr> 
	<?php endforeach;?> 
	</table>
<?php endif; ?>
Return current item: Katropine DBmanager