Ver Mensaje Individual
  #3 (permalink)  
Antiguo 20/03/2014, 09:36
Avatar de fernando_vc87
fernando_vc87
 
Fecha de Ingreso: diciembre-2013
Mensajes: 3
Antigüedad: 10 años, 4 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)