
Linkear una consulta de mi bd
Publicado por Juan Fernando (7 intervenciones) el 12/05/2016 17:37:01
Buen día: Necesito un poco de ayuda con esta tarea que tengo. Realizo una consulta a mi bd a través de un código php, el cual pongo aquí.
Viendo la imagen de mi consulta:

En esa consulta yo quisiera que por ejemplo, el campo 'idMunicipio' o 'Munic' en la imagen, el registro "2" apareciera linkeable y me llevara a otra página mostrándome el id de esa tabla y me muestre uno o dos registros.
Primero que todo quiero saber si es esto posible. Gracias.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
require("class/clientes.php");
include "header.php";
?>
<p>
<a href="create.php" class="btn btn-primary btn-md"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Agregar Clientes</a><br/>
</p>
<table id="ghatable" class="display table table-bordered table-stripe" cellspacing="0" width="100%">
<thead>
<tr>
<th>ID</th>
<th>DOC</th>
<th>TIPO</th>
<th>N1</th>
<th>N2</th>
<th>APE1</th>
<th>APE2</th>
<th>Dir Cas</th>
<th>Tel Cas</th>
<th>Munic</th>
<th>Dir Of</th>
<th>Tel Of</th>
<th>Cel</th>
<th>Ing</th>
<th>Egr</th>
<th>MODIFICAR</th>
<th>ELIMINAR</th>
</tr>
</thead>
<tbody>
<?php
$objclientes = new Clientes();
$clientes = $objclientes->clientes();
if(sizeof($clientes) > 0){
foreach ($clientes as $row){
?>
<tr>
<td><?php echo $row['idCliente'] ?></td>
<td><?php echo $row['nroDocumento'] ?></td>
<td><?php echo $row['tipoDocumento'] ?></td>
<td><?php echo $row['nombre1'] ?></td>
<td><?php echo $row['nombre2'] ?></td>
<td><?php echo $row['apellido1'] ?></td>
<td><?php echo $row['apellido2'] ?></td>
<td><?php echo $row['dirCasa'] ?></td>
<td><?php echo $row['telCasa'] ?></td>
<td><?php echo $row['idMunicipio'] ?></td>
<td><?php echo $row['dirOfic'] ?></td>
<td><?php echo $row['telOfic'] ?></td>
<td><?php echo $row['celular'] ?></td>
<td><?php echo $row['ingresos'] ?></td>
<td><?php echo $row['egresos'] ?></td>
<td>
<a href="update.php?u=<?php echo $row['idCliente'] ?>"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Editar</a>
</td>
<td>
<a onclick="return confirm('Desea eliminar el registro')" href="delete.php?d=<?php echo $row['idCliente'] ?>"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Eliminar</a>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<?php
include "footer.php";
?>
Viendo la imagen de mi consulta:

En esa consulta yo quisiera que por ejemplo, el campo 'idMunicipio' o 'Munic' en la imagen, el registro "2" apareciera linkeable y me llevara a otra página mostrándome el id de esa tabla y me muestre uno o dos registros.
Primero que todo quiero saber si es esto posible. Gracias.
Valora esta pregunta


0