Jump to content

wagscd

New Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by wagscd

  1. A very BIG Thanks. That works For the second point, to be honnest, i don't know. I have find a script like this. So i make just the "copy cat" I'm a beginner. I will try to understand your advice. Thanks so much.
  2. HI Barand, Thanks for your anwser. Here is this function public function getQueryCount($tableName, $field, $cond='') { $stmt = $this->pdo->prepare("SELECT count($field) as total FROM $tableName WHERE 1 ".$cond); try { $stmt->execute(); $res = $stmt->fetchAll(PDO::FETCH_ASSOC); if (! $res || count($res) != 1) { return $res; } return $res; } catch (\PDOException $e) { throw new \RuntimeException("[".$e->getCode()."] : ". $e->getMessage()); } } I have try to compare with another function but i don't know why this one don't works Thanks by advance for your help Have a good day
  3. Hi all, I have a code for count number of Long trade/ This code count the "long" $count_long_trades = $db->getQueryCount('tbl_trades','lg_short_trade',' AND lg_short_trade="Long" AND num_bot_trade="'.$_REQUEST['editId'].'"'); It works perfectly. Now i need to add a criteria and i'm totally lost I have try this but not works The same code but with the count of only the positive PnL $count_long_trades_pos = $db->getQueryCount('tbl_trades','lg_short_trade',' AND lg_short_trade="Long" ','pnl_trade',' AND pnl_trade > 0 AND num_bot_trade="'.$_REQUEST['editId'].'"'); Thanks by advance for your help. Have a good day
  4. Hi guys, Html, it's okay Css, it's okay Php, logic saves me very often, learning a little but I often feel overwhelmed despite what I research again and again. I am doing my best ;) Thanks by advance for your help
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.