<div class="panel panel-default">
		        <div class="panel-heading">&nbsp;</div>
		        <div class="panel-body table-responsive">
		            <table id="notarios" class="display" cellspacing="0" width="100%">
		                <thead>
		                    <tr>
		                        <th>&nbsp;</th>
		                        <th>ID</th>
		                        <th>Nombre</th>
		                        <th>Notaría</th>
		                        <th>Municipio</th>
		                    </tr>
		                </thead>
		                <tbody>
		                    <?php 
while ($row = $oDB->fetch_array($res)) {
    echo '<tr>';
    echo '<td><button class="detalles btn btn-default"></button></td>';
    echo '<td>' . $row['0'] . '</td>';
    echo '<td>' . $row['1'] . '</td>';
    echo '<td align="center">' . $row['2'] . '</td>';
    echo '<td>' . $row['3'] . '</td>';
    echo '</tr>';
}
?>
		                </tbody>
		            </table>
		        </div>
		    </div>
		</div>
    
Exemplo n.º 2
0
<?php

include "../dist/class/class_db.php";
$oDB = new Datos();
$oDB->db = 'mysql';
$id = $_POST['id'];
$sql = 'select concat_ws(" ",n.calle, n.colonia, n.num_ext), n.tel_not1 from `not` n, municipio m where n.municipio = m.no_mun and n.id = ' . $id;
$res = $oDB->query($sql);
$row = $oDB->fetch_array($res);
echo json_encode($row);