Exemplo n.º 1
0
 public function getResultsByCustomerId($id, $cc = true)
 {
     if (!$id) {
         return array();
     }
     $db = self::$_msql = SafeMySQL::getInstance();
     $sql = "SELECT\n\t\t\tp.`payment_id`,\n\t\t\tp.`customer_id`,\n\t\t\tp.`method_id`,\n\t\t\tp.`num1`,\n\t\t\tp.`num2`,\n\t\t\tp.`num3`,\n\t\t\tp.`num4`,\n\t\t\tp.`txt1`,\n\t\t\tp.`txt2`,\n\t\t\tp.`txt3`,\n\t\t\tp.`txt4`";
     $sql .= $cc ? " , p.`note1`" : '';
     $sql .= "FROM `payments` as p\n\t\t\tWHERE p.`customer_id`=?i";
     $sqlParse = $db->parse($sql, $id);
     return $this->getSqlParse($sqlParse);
 }