Cita:
Iniciado por sentnel
Thanks mortiprogramador!
I tried your suggestions:
- try to put echo to the $query and this is the result:
SELECT SUM(pte_circuns_her_arm_fuego) FROM jos_polnac_partediario_gen WHERE departamento_pn='1' AND fecha_hora_partediario BETWEEN DATE ('2010-10-17 17:33:00') AND ('2010-10-20 00:55:00')
- run this query that show in yog:
- if this work, then try without while, only set the var $row and show the result (row[0]):
this is the code, check if the syntax is correct (with the $row var, etc.)
Código PHP:
<?php
$query = "SELECT
SUM(pte_circuns_her_arm_fuego) FROM jos_polnac_partediario_gen
WHERE departamento_pn='1' AND fecha_hora_partediario
BETWEEN DATE ('2010-10-17 17:33:00')
AND ('2010-10-20 00:55:00')";
$result = mysql_query($query);
$row = mysql_fetch_row($result);
echo $row[0];
?>
and again the error:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in F:\xampp\htdocs\palacio\stats\stat1.php on line 17
Thanks again!
Hí!
Sorry, i don't speak english very well.
But, you're tested in change the
mysql_fetch_row($result); by
mysql_fetch_array($result)?
//---
Hola!
Perdoname, pero todavia no domino muy bien el ingles.
Probaste en cambiar el
mysql_fetch_row($result); por
mysql_fetch_array($result)?
Luck!