![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
20/03/2014, 09:36
|
![Avatar de fernando_vc87](http://static.forosdelweb.com/customavatars/avatar541107_1.gif) | | | Fecha de Ingreso: diciembre-2013
Mensajes: 3
Antigüedad: 11 años, 2 meses Puntos: 0 | |
Respuesta: Problema between php $consulta=mssql_query("
select
sum(Quantity) as Cantidad,
sum(LineTotal) as Total,
Sucursal,
TT
from Ventas_Web2
where
DocDate between '03/01/2014' and '03/19/2014'
AND ItemCode<>'NCARGOIVA5' and CardCode!='Null'
Group by Sucursal,TT
");
$resultados=mssql_num_rows($consulta);
if (mssql_num_rows($consulta)) {
while ($row = mssql_fetch_assoc($consulta)) {
$result[] = $row;
}
}
echo $resultados;
---------------------------------
me imprime 0
y si cambio la consulta a:
select
sum(Quantity) as Cantidad,
sum(LineTotal) as Total,
Sucursal,
TT
from Ventas_Web2
where
ItemCode<>'NCARGOIVA5' and CardCode!='Null'
Group by Sucursal,TT
me imprime xxx (el numero de registros en mi BD) |