PRoblem with consulting tables.
Posted by:
Jose Numis
Date: March 07, 2017 03:08AM
Hi all,
I have this code associated with a search:
$busqueda=mysql_query("SELECT * FROM oficinas WHERE Oficina LIKE '%".$busca."%' OR direccion LIKE '%".$busca."%' OR Municipio LIKE '%".$busca."%' OR Provincia LIKE '%".$busca."%' OR ofi LIKE '%".$busca."%' OR delegadoDR LIKE '%".$busca."%'") ;
?>
<table width="1054" border="1" align="left">
<tr>
<td>Oficina</td>
<td>Telefono</td>
<td>ofi</td>
<td>Dirección</td>
<td>CP</td>
<td>Municipio</td>
<td>Provincia</td>
<td>CCAA</td>
<td>DDR</td>
<td>Enlace a Ofi</td>
<td>Registrar</td>
</tr>
<?php
while($muestra=@mysql_fetch_array($busqueda)){
echo '<tr>';
echo '<td>'.$muestra['Oficina'].'</td>';
echo '<td>'.'<a href="tel:+'.$muestra['telefono'].'">'.$muestra['telefono'].'</a>'.'</td>';
echo '<td>'.$muestra['ofi'].'</td>';
echo '<td>'.$muestra['direccion'].'</td>';
}
}
?>
</table>
The think is I want to add, and to show in the echo a new register that is a value of most recent date from a table called "registro" which has ofi, dateofvisit, user.
I´m trying to make an inner or left join but I don´t know how.
I want that the most recent date on "registro" appears when show .$muestra['ofi'].
I hope I have explainned correctly.
Subject
Written By
Posted
PRoblem with consulting tables.
March 07, 2017 03:08AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.