Dear Azar vai,
Plz try this
$query=mysql_query("select SUM(payment) as totalPayment from msa_payment WHERE date BETWEEN '".$from_date."' AND '".$to_date."'");
single cote double cote dot $variable dot double cote single cote => '".$variable."'
--
Saiful Islam
Gazipur, Bangladesh
http://saifulbd.com/
ok, this was my problem---
<?php
$from_date=$_POST['from_year']."-".$_POST['from_month']."-".$_POST['from_day'];
$to_date=$_POST['to_year']."-".$_POST['to_month']."-".$_POST['to_day'];
include('db_variable.php');
class total_summary{
var $total_payment;
public function msa_payment(){
$query=mysql_query("select SUM(payment) as totalPayment from msa_payment WHERE date BETWEEN '$from_date' AND '$to_date'");
$row=mysql_fetch_array($query);
echo $this->total_payment=$row['totalPayment'];
}
}
No comments:
Post a Comment