JFive - 2008-01-02 21:12:51
I got a lot of warnings like this:
Warning: mysql_data_seek() [function.mysql-data-seek]: Offset 0 is invalid for MySQL result index 1572 (or the query data is unbuffered) in D:\www\pruebas\classes\mysql.class.php on line 1125
I use IIS with PHP Version 5.2.5 (Server API ISAPI)
Mysql Client API version 5.0.45
Please help me.. FOR iterations don't finish
include("classes/mysql.class.php");
$db = new MySQL();
//error_reporting(0);
$abogado = $db->QueryArray("select abog_id, abog_mnue, abog_appa, abog_apma, abog_nomb, abog_finc from cabs_abogado order by abog_appa, abog_apma, abog_nomb");
$total = $db->RowCount();
echo $total." registros<br><br>";
echo "<table border='1'>";
echo "<tr>
<td>Nro</td>
<td>Matricula</td>
<td>Apellidos y Nombres</td>
<td>Domicilio</td>
<td>Telefono</td>
<td>Celular</td>
<td>Estudio</td>
<td>Telefono</td>
<td>Celular</td>
<td>Trabajo</td>
<td>Telefono</td>
<td>Celular</td>
</tr>";
for($i=0;$i<$total;$i++) {
$sql="select abog_id, tigr_id, dire_desc, dire_tele, dire_cell
from cabs_direccion
where abog_id='{$abogado[$i]['abog_id']}'"; // domicilio
$rowdomicilio = $db->QueryArray($sql);
$domicilio=utf8_decode($rowdomicilio[0]['dire_desc']);
$teledomicilio=utf8_decode($rowdomicilio[0]['dire_tele']);
$celldomicilio=utf8_decode($rowdomicilio[0]['dire_cell']);
$estudio=utf8_decode($rowdomicilio[1]['dire_desc']);
$teleestudio=utf8_decode($rowdomicilio[1]['dire_tele']);
$cellestudio=utf8_decode($rowdomicilio[1]['dire_cell']);
-------------------
Excuse my English pls...
$trabajo=utf8_decode($rowdomicilio[2]['dire_desc']);
$teletrabajo=utf8_decode($rowdomicilio[2]['dire_tele']);
$celltrabajo=utf8_decode($rowdomicilio[2]['dire_cell']);
echo sprintf("<tr>
<td>%d</td>
<td>%s</td>
<td>%s %s, %s</td>
<td>%s</td>
<td>%s</td>
<td>%s</td>
<td>%s</td>
<td>%s</td>
<td>%s</td>
<td>%s</td>
<td>%s</td>
<td>%s</td>
</tr>",
$i+1,
$abogado[$i]['abog_mnue'],
$abogado[$i]['abog_appa'],
$abogado[$i]['abog_apma'],
$abogado[$i]['abog_nomb'],
$domicilio,
$teledomicilio,
$celldomicilio,
$estudio,
$teleestudio,
$cellestudio,
$trabajo,
$teletrabajo,
$celltrabajo);
}
echo "</table>";
echo "$i registros impresos";