Es con SQL server y al colocar ese if que me dice no me muestra ningun error ni nada.
Que otra cosa puedo hacer
Este es el codigo php
Código PHP:
<?
// Cargo los eventos registrados en la base de datos.
$CrgEventos = mssql_query("select * from Eventos where Fecevento Between '$FecInicio 00:00:00' and '$FecFinal 23:59:59' order by Fecevento desc, Codevento desc");
$EvtRegistrados = mssql_num_rows($CrgEventos);
if ($EvtRegistrados == 0)
echo "<br /><center><b> No se registraron Eventos en las fechas seleccionadas </b><br /><i> Favor intentelo de nuevo. </i></center>";
else
{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title> Reporte - Eventos Registrados </title>
<link href="EventosCSS.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table class="TablaReporte" align="center">
<tr>
<td colspan="14" class="Titulos" width="70%"> Registro De Eventos </td>
<td colspan="4" align="center"><img src="../images/accion.jpg" alt="Accion" width="163" height="93" /></td>
</tr>
<tr class="Mensajes">
<td>COD.</td>
<td>FEC. REGISTRO </td>
<td>AREA</td>
<td>RIESGO</td>
<td>LIN. OPERATIVA</td>
<td>FECHA INICIO</td>
<td>FECHA FINAL</td>
<td>FECHA IDENTIFICACIÓN</td>
<td>TIP. PERDIDA</td>
<td>FEC.CONTAB</td>
<td>MONTO PERDIDA</td>
<td>CUANTIA RECUPERADA</td>
<td>C.R. POR CONCEPTO SEGUROS</td>
<td>DIVISA</td>
<td>PERDIDA ESTIMADA</td>
<td>CLASE RIESGO</td>
<td>PRODUCTO AFECTA</td>
<td>COMENTARIO</td>
</tr>
<?
// Recorro los registros encontrados en la consulta
while ($DatEvento = mssql_fetch_array($CrgEventos))
{
echo "<tr class=CamposFormulario>";
echo "<td class=Mensajes>".$DatEvento['Codevento']."</td>";
echo "<td>".$FecEvento=strftime('%d de %B %Y %H:%m',strtotime($DatEvento['Fecevento']))."</td>";
// Aca continua mostrando los otros campos
Aclaro que cuando pongo
Código PHP:
$CrgEventos = mssql_query("select * from Eventos");
Funciona perfectamente el reporte aunque logicamente me queda sin filtrar la consulta.