De casualidad alguien puede decirme por qué no me está reemplazando el valor default NULL en esta sentencia de PHP....
str_replace(NULL,"Sin valor",$row['valor'])
Código PHP:
Ver original die("Can't connect to database");
die("Can't select database");
// sending query
$result = mysql_query("select {$table}.nomb_gpo,{$table}.nomb_ind,valor from {$table} join indicador on {$table}.nomb_ind=indicador.nomb_ind where nomb_pla='$_REQUEST[plan_inst]' and nomb_cen='$_REQUEST[cen_trabajo]' and mes='{$mth}' and ano='{$yr}' order by id_ind asc limit 0,3;"
,$conexion) or
die("Problemas en el select result: ".mysql_error());
echo "<table id=\"demo4_table\" cellpadding=\"2\" cellspacing=\"1\" border=\"2\" width=\"453\" align=left >";
// printing table rows
echo "<tr><td rowspan='1' colspan='3' align='center' bgcolor='58ACFA'><b>Instalaciones y Equipos</b></td></tr>\n";
{
echo "<TR>";
echo "<TD>".$row['nomb_ind']."</TD>";
echo "<TD width=\"83\" align=center>".str_replace(NULL,"Sin valor",$row['valor'])."</TD>"; echo "</tr>\n";
}
El pequeño gran detalle es que NO me está reemplazando el Valor NULL por "Sin Valor"....
Para verificar que la parte de MySQL sí está trabajando bien pongo lo siguiente:
Código MySQL:
Ver original+-------+
| valor |
+-------+
+-------+
13 rows
in set (0.01 sec
)