dqa35710 2017-09-23 18:59 采纳率: 0%
浏览 28

PHP和Phpmyadmin乘法

I want to hit 2 values with the same id on PhpMyAdmin. According to the codes below, only the aggregation is running in the outputs I receive. I get a value of 0 when I multiply instead of adding.

<?php 

$a = 0; 

$oran = new sorgu; 
$k_id = $kuponlar->veri->id; 

$oran->select("*","matches","kid=$k_id"); 
while($oran->verioku()){
    $a =  $a+ floatval($oran->veri->oran);
}

echo $a; 

?>

Screenshots:

It is necessary to multiply the "oran" values in there. But those with the same "kid" value are at least struck for that table. It is necessary to multiply the "rate" values in there. But those with the same "kid" value are at least struck for that table.

That's the code that's running That's the code that's running

Action Required:

1,25 x 1,5 x 1,3 x 1,55

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 有人能看一下我宿舍管理系统的报修功能该怎么改啊?链表那里总是越界
    • ¥15 cs loadimage运行不了,easyx也下了,没有用
    • ¥15 r包runway详细安装教程
    • ¥15 Html中读取Json文件中数据并制作表格
    • ¥15 谁有RH342练习环境
    • ¥15 STM32F407 DMA中断问题
    • ¥15 uniapp连接阿里云无法发布消息和订阅
    • ¥25 麦当劳点餐系统代码纠错
    • ¥15 轮班监督委员会问题。
    • ¥20 关于变压器的具体案例分析