Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function consultMySql(){
- $cSQL = "SELECT SUM(CRIME.id), " .
- "PRIMARY_TYPE.Type " .
- "FROM CRIMES.CRIME " .
- "INNER JOIN PRIMARY_TYPE " .
- "ON CRIME.Type = PRIMARY_TYPE.id " .
- "WHERE Distric = ? AND " .
- "PRIMARY_TYPE.Type = ? " .
- "AND CRIME.anno = ?; " ;
- if($this->stmt = $this->oConni->prepare($cSQL)){
- $this->stmt->bind_param('isi', $this->request["data"]["district"], $this->request["data"]["type"],$this->request["data"]["anno"] );
- $this->stmt->execute();
- $this->stmt->store_result();
- $this->stmt->bind_result($Total, $Type);
- while ($this->stmt->fetch()) {
- $this->data[] = array("Total" => $Total, "Type" => $Type);
- }
- }else{
- $this->stmt->error;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement