1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44: | function fetch_data($query_identifier,$mode = 1){
if($mode == 1){ $result = mysql_fetch_array($query_identifier,$this->connection) or die ($this->error()); }
if($mode == 2){ $result = mysql_fetch_row($query_identifier,$this->connection) or die ($this->error()); }
if($mode == 3){
$result = mysql_affected_rows($query_identifier,$this->connection) or die ($this->error());
if($result == 0){
$result = FALSE;
}
else {
$result = $result;
}
}
if($mode == 4){
$result = mysql_num_rows($query_identifier,$this->connection) or die ($this->error());
if($result == 0){
$result = FALSE;
}
else {
$result = $result;
}
}
return $result;
} |