8 "servername"=>
"localhost",
22 if($this->
settings[
"error_file"] ===
true) $this->
settings[
"error_file"] = dirname(__FILE__).
"/__mysql_errors.log";
26 $this->
data =
new mysqli(
34 if(mysqli_connect_errno()) {
35 $this->
error(
"Connection error: ".mysqli_connect_error() );
38 if(!$this->
data->set_charset(
"utf8")) {
39 $this->
error(
"Error loading character set utf8");
47 $this->
error(
"Could node connect for query: ".$sql);
51 if(!($this->result = $this->
data->query($sql))) $this->
error($sql);
52 return ($this->result) ? true :
false;
57 $this->
error(
"No query pending");
61 $this->row = $this->result->fetch_array(MYSQL_BOTH);
62 return ($this->row) ? true : false ;
66 if(!$this->row)
return false;
71 foreach($this->row as $k => $v) {
72 if(!is_int($k)) $return[$k] = $v;
76 foreach($this->row as $k => $v) {
77 if(is_int($k)) $return[$k] = $v;
84 return array_map(
"stripslashes",$return);
89 $this->
error(
"No query pending");
93 while($this->
nextr()) {
95 else $return[] = $this->
get_row($mode);
101 return stripslashes($this->row[
$index]);
106 $this->
error(
"No query pending");
113 if (!$this->result) {
114 $this->
error(
"nf: no result set");
117 return $this->result->num_rows;
120 return $this->
data->affected_rows;
125 if($this->
settings[
"error_file"] !==
false) {
126 $handle = @fopen($this->
settings[
"error_file"],
"a+");
128 @fwrite($handle,
"[".
date(
"Y-m-d H:i:s").
"] ".$string.
" <".$error.
">\n");
133 if(isset($this->result)) $this->result->free();
134 @$this->
data->close();
139 return $this->
data->insert_id;
142 if(!$this->
data)
return addslashes($string);
143 return $this->
data->escape_string($string);
147 if(isset($this->result)) $this->result->free();
148 if($this->
data) $this->
data->close();
get_all($mode="both", $key=false)
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
Create styles array
The data for the language used.