|
|
|
Query was Empty ช่วยดูให้ทีครับ = = งงครับงงใครทำได้่ช่วยบอกทีนะครับ |
|
|
|
|
|
|
|
add_share
function insert_punpol($div_id,$mem,$amount,$y,$tempday){
connect();
$add = false;
$sql = "SELECT * FROM tbl_share Where Member_id = '".$mem."' ORDER BY Dateshare DESC";
$result = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_array($result);
$rateDate = "SELECT * FROM tbl_rate Where Years = '".$y."' ";
$resultdate = mysql_query($rateDate) or die(mysql_error());
$rowrate = mysql_fetch_array($resultdate);
$strprice_share=$amount*$rowrate['Price_share'];
$bal = $rowrate['Payment_amount'] + $strprice_share;
$punpol=(($bal*$rowrate['Rate_share'])/100/12);
echo $punpol;
echo $bal;
$sql = "INSERT INTO tbl_dividend(Div_id,Member_id,Date_dividend,Dividend,Rate_id,Years) VALUES ('".$div_id."','".$mem."','".$tempday."','".$punpol."','".$rowrate['Rate_id']."','".$y."')";
$result = mysql_query($sql) or die(mysql_error());
if($result >0){
$add=true;
}else{
$add=false;
}
return $add;
}
punpol
insert_punpol($txtdivID,$mem,$total_share,$y,$tempday);
คือกำลังลองคำนวณดูครับ ข้อมูลเข้าแต่มันขึ้นว่า Query was empty ช่วยดูให้ทีนะครับ
Tag : PHP
|
|
|
|
|
|
Date :
2011-01-25 20:31:20 |
By :
Yaizenx |
View :
1267 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|