"; //echo $username."
"; //echo $pass."
"; $connect_return = mysqli_connect("$server","$username","$pass"); if( $connect_return ){ mysqli_select_db($connect_return,$dbname); } else{ die("Could not connect: " . mysqli_error()); } return $connect_return; //echo "Connect Return"." "."$connect_return"."
"; }#end function connect_db function connect_to_db() { //$this->connect_db(DBNAME,USERNAME,PASSWORD,HOSTNAME); }#end function connect_to_db #this function is used to execute sql query function query_db($conn,$qstring) { //$this->connect_db(DBNAME,USERNAME,PASSWORD,HOSTNAME); Global $ms_error; $res = mysqli_query($conn,$qstring) or die(mysqli_error()."error111"); //echo "RES".$res; return $res; }#end function query_db function result_db1($re,$row,$field) { $row1 = count($field); for($i=0;$i<$row;$i++) { for($j=0;$j<$row1;$j++) { $result[] = mysqli_result($re,"$i","$field[$j]"); } } return $result; } #this function is used to get number of rows from the result set function row_db($rvalue) { if($rvalue != "") { //echo "$rvalue"."
"; $row = mysqli_num_rows($rvalue); return $row; } else { return 0; } }#end function row_db #this function is used to insert record in db function insertid_db() { //$this->connect_db(DBNAME,USERNAME,PASSWORD,HOSTNAME); $id = mysqli_insert_id(); //echo "
".$id."
"; //$this->close_db(); return $id; }# end function insertid_db #this function is used to get error number function errno_db() { $errno = mysqli_errno(); return $errno; }#end function errno_db #this function is used to return sql errors function err_db() { //echo mysqli_error(); return mysqli_error(); }#end function err_db #this function is used to get affected rows function aff_row() { $affrow = mysqli_affected_rows(); return $affrow; }#end function aff_row #this function is used to get the result in array function result_db($re) { $Number_Of_Rows = $this->return_Number_Of_Rows($re); $count=0; # To populate the first row as array of Names of the fields in table $rows_as_array[$count] = $this->return_Names_Of_Fields_As_Array($re); # Start from populating the array with array from the 2nd row. for ($count = 1; $count < $Number_Of_Rows+1; $count++) { $rows_as_array[$count]= mysqli_fetch_object ($re); } return $rows_as_array; }#end function result_db #this function is used to disconnect database function close_db() { //mysqli_close(); }#end function close_db #this function is used to get number of fields retrieved in result set function return_Number_Of_Fields($result_identifier) { $Number_Of_Fields = @mysqli_num_fields($result_identifier); return $Number_Of_Fields; }# end function return_Number_Of_Fields #this function is used to get number of rows from result set function return_Number_Of_Rows($result_identifier) { $Number_Of_Rows = @mysqli_num_rows($result_identifier); return $Number_Of_Rows; }# end function return_Number_Of_Rows #this function is used to get field name in array function return_Names_Of_Fields_As_Array($result_identifier) { $no = $this->return_Number_Of_Fields($result_identifier); for ($count = 0; $count < $no; $count++) { $field_name=mysqli_field_name($result_identifier,$count); $test=$Names_Of_Fields[$field_name] =$field_name; } $no = $this->return_Number_Of_Rows($result_identifier); return $Names_Of_Fields; }# end of return_Name_Of_Fields_As_Array #this function is used to call function to get result function get_result($sql_query) { //$this->connect_db(DBNAME,USERNAME,PASSWORD,HOSTNAME); $sql_result=$this->query_db($sql_query); $sql_resultarray=$this->result_db($sql_result); return $sql_resultarray; //$this->close_db(); }# end of get_result #this function is used to call function to delete record function del_record($conn,$tablename,$id_name,$id) { //$this->connect_db(DBNAME,USERNAME,PASSWORD,HOSTNAME); $sql_query="DELETE FROM ".$tablename." WHERE ".$id_name." =".$id." LIMIT 1"; $sql_result=$this->query_db($conn,$sql_query); //$this->close_db(); return $sql_result; }# end of get_result # function to insert record function insertrecord($conn,$tablename,$array) { //$this->connect_db(DBNAME,USERNAME,PASSWORD,HOSTNAME); $counttimer=1; $tablefields=""; $formfield=""; foreach ($array as $key => $val) { $tablefields .= $key; $formfield .= "\"".addslashes($val)."\""; if(count($array)!=$counttimer) { $tablefields .=","; $formfield .= ","; } $counttimer=$counttimer+1; } $sql = "insert into ".$tablename."(".$tablefields.") values (".$formfield.")"; $res=$this->query_db($conn,$sql); $this->close_db(); return $res; } # function to update record function updaterecord($conn,$tablename,$array,$where) { $update_fields=""; $counttimer=1; foreach ($array as $key => $val) { $update_fields .=$key ."= \"" . addslashes($val)."\""; if(count($array)!=$counttimer) { $update_fields .=","; } $counttimer=$counttimer+1; } $counttimer=1; if($where!="") { $where_string =""; foreach ($where as $key => $val) { $where_string .=$key ."= '" . $val."'"; if(count($where)!=$counttimer) { $where_string .=" and "; } $counttimer=$counttimer+1; } } $sql = "update ".$tablename." set ".$update_fields; if($where!="") { $sql.=" where ".$where_string; } $res=$this->query_db($conn,$sql); //echo "

".$sql."

"; return $res; } #end of updaterecord function }#end of class SQL_FUNCTION ?>
Click on each county to view hunting properties
Why select Riedel Farms?
Riedel Farms provides affordable hunting and land lease options within Minnesota while offering a tailorable hunting experience based upon the land owners and hunters requirements.
Affordability:

  • Riedel Farms has no membership or subscription fees which means that both hunters and land owners receive maximum value for their respective leases.
  • Riedel Farms prides itself on having low overhead expenses since it focuses solely on Minnesota leases and doesn’t have a full time staff like the large out-of-state leasing companies.
  • Tailorable Hunting Experiences.

  • Land owners drive the availability and type of game allowed to be harvested from their land. Leases are tailorable from offering land for the entire season or down to the specific day which is unique to other hunting leasing companies.
  • Hunters can request consideration of special circumstances with land owners such as multiple hunter access or low-cost participation in Minnesota Youth Deer Hunt.
  • Veteran Commitment

  • Riedel Farms is a veteran-owned company that strives to provide hunting leases to our currently serving military service men and women.
  • Land owners may contribute their land to service members that have volunteered to serve their nation.
  • Riedel Farms will make every effort to find the type of veteran that the land owner seeks to have hunt on their land. Land owners can offer their land up to National Guard, Special Operations, or any specific Military Service (Army, Navy, Air Force, Marines, Coast Guard).





  • "; } ?>