Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/01/2012, 09:17
lizz17_87
 
Fecha de Ingreso: febrero-2011
Mensajes: 38
Antigüedad: 13 años, 2 meses
Puntos: 1
porqué me sale este error en esta consulta Warning: mysql_fetch_assoc() expects param

En la linea que tiene el comentario me sale el error y no se porque.. me podrian ayudar por favor ..!

$consulta = mysql_query("Select numeroExpediente,ciBeneficiario,nombreBeneficiario , idMunicipios,nombreRubro,plazo,condicion,asistenci aTecnica,tipoFondoRiesgo,mon
toFondoRiesgo,imprevisto,has,montoAprobado,DATE_FO RMAT(fechaVcto,'%Y/%m/%d') as fechaVcto,pPartida,DATE_FORMAT(fechapPartida,'%Y/%m/%d') as fechapPartida,sPartida, DATE_FORMAT(fechasPartida,'%Y/%m/%d') as fechasPartida, tPartida, DATE_FORMAT(fechatPartida,'%Y/%m/%d') as fechatPartida From exp Where numeroExpediente = '$numeroExpediente'");
if ($registro=mysql_fetch_assoc($consulta)) {

$query = mysql_query("SELECT a.numeroExpediente, a.fechaDesde, a.fechaHasta, a.dias, a.monto, a.interesOrdinario, a.interesOrdinarioLuegoVcto, a.interesMoratorio, b.fechaVcto, DATEDIFF(b.fechaVcto,a.fechaHasta) AS fechaV FROM detalleliquidaciones a, exp b WHERE a.numeroExpediente = b.numeroExpediente");
$int_tv=0;
/*EN ESTA LINEA ERROR*/
while ($rec=mysql_fetch_assoc($query)) {
$fechaV = $rec[9];
if ($fechaV<0){
$interesV = $rec[4]*($fechaV/360)*0.0869;
$interesM = $rec[4]*($fechaV/360)*0.03;
}else{
$interesV = 0;
$interesM = 0;
}
$rec['interesV']= $interesV;
$rec['interesM']= $interesM;

$int_tv=$int_tv+$rec['interesV'];

$sal[]=$rec['interesV']."-".$rec['interesM']."-".$int_tv;
}