src/VTvotingTrees.class.php
// user takes his issue into his hands
user takes his issue into his hands
user takes his issue into his hands
function unDelegate($user)
  {
    $id=$this->id;
    $query="LOCK TABLES VTpending WRITE, VTdelegate WRITE";
    mysqli_query($this->mysqli_link,$query);
    $query="CALL unDelegate($id,$user,@o_steps,@o_result)";
    mysqli_query($this->mysqli_link,$query);
    $query = "select @o_steps,@o_result";
    $result=mysqli_query($this->mysqli_link,$query);
    $result_vals=mysqli_fetch_array($result);
    $row=mysqli_fetch_array($result);
    $query="UNLOCK TABLES";
    mysqli_query($this->mysqli_link,$query);
    return $result_vals['@o_result'];
  }
function unDelegate ( $ user ) { $ id = $ this -> id ; $ query = " LOCK TABLES VTpending WRITE, VTdelegate WRITE " ; mysqli_query ( $ this -> mysqli_link , $ query ) ; $ query = " CALL unDelegate( $ id , $ user ,@o_steps,@o_result) " ; mysqli_query ( $ this -> mysqli_link , $ query ) ; $ query = " select @o_steps,@o_result " ; $ result = mysqli_query ( $ this -> mysqli_link , $ query ) ; $ result_vals = mysqli_fetch_array ( $ result ) ; $ row = mysqli_fetch_array ( $ result ) ; $ query = " UNLOCK TABLES " ; mysqli_query ( $ this -> mysqli_link , $ query ) ; return $ result_vals [ '@o_result' ] ; }
user takes his issue into his hands
user takes his issue into his hands
// lock tables pending, VTdelegate // TODO: error handling // print mysqli_error($this->mysqli_link); //    print $query; // TODO: error handling // print mysqli_error($this->mysqli_link); //    print_r( $row ); // TODO: error handling // print mysqli_error($this->mysqli_link); // debuging ************************** //    $query="SELECT * FROM temp_results"; //    $result=mysqli_query($this->mysqli_link,$query); //    print mysqli_error($this->mysqli_link); //    while($row=mysqli_fetch_array($result)) //      { //	print("<br>"); //	print_r($row); //      } // ***********************************