8 "servername"=>
"localhost",
22 if($this->
settings[
"error_file"] ===
true) $this->
settings[
"error_file"] = dirname(__FILE__).
"/__mysql_errors.log";
27 $this->link = ($this->
settings[
"persist"]) ?
30 $this->settings[
"username"],
31 $this->settings[
"password"]
34 $this->settings[
"servername"].
":".$this->settings[
"serverport"],
35 $this->settings[
"username"],
36 $this->settings[
"password"]
39 if (!mysql_select_db($this->
settings[
"database"], $this->link)) $this->
error();
40 if($this->link) mysql_query(
"SET NAMES 'utf8'");
41 return ($this->link) ? true :
false;
46 if (!($this->result = mysql_query($sql, $this->link))) $this->
error($sql);
47 return ($this->result) ? true :
false;
52 $this->
error(
"No query pending");
56 $this->row = mysql_fetch_array($this->result, MYSQL_BOTH);
57 return ($this->row) ? true : false ;
61 if(!$this->row)
return false;
66 foreach($this->row as $k => $v) {
67 if(!is_int($k)) $return[$k] = $v;
71 foreach($this->row as $k => $v) {
72 if(is_int($k)) $return[$k] = $v;
79 return array_map(
"stripslashes",$return);
84 $this->
error(
"No query pending");
88 while($this->
nextr()) {
90 else $return[] = $this->
get_row($mode);
96 return stripslashes($this->row[
$index]);
101 $this->
error(
"No query pending");
104 if(!mysql_data_seek($this->result,
$row)) $this->
error();
108 if ($numb = mysql_num_rows($this->result) ===
false) $this->
error();
109 return mysql_num_rows($this->result);
112 return mysql_affected_rows();
117 if($this->
settings[
"error_file"] !==
false) {
118 $handle = @fopen($this->
settings[
"error_file"],
"a+");
120 @fwrite($handle,
"[".
date(
"Y-m-d H:i:s").
"] ".$string.
" <".$error.
">\n");
125 if(isset($this->result)) mysql_free_result($this->result);
126 mysql_close($this->link);
131 if(!$this->link)
return false;
132 return mysql_insert_id();
135 if(!$this->link)
return addslashes($string);
136 return mysql_real_escape_string($string);
140 if (isset($this->result)) mysql_free_result($this->result);
141 if (isset($this->link)) mysql_close($this->link);
get_all($mode="both", $key=false)
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
Create styles array
The data for the language used.