Skip to content

Commit e125147

Browse files
author
Indieteq
committed
Update Db.class.php
Fixed the tab spacing
1 parent fda5f14 commit e125147

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

Db.class.php

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
2-
/* *
3-
* DB - A simple database class
4-
*
5-
* @author Author: Vivek Wicky Aswal. (https://twitter.com/#!/VivekWickyAswal)
6-
* @git htt://github.com/indieteq-vivek/simple-db-class
7-
* @version 0.2a
8-
*
9-
*/
2+
/**
3+
* DB - A simple database class
4+
*
5+
* @author Author: Vivek Wicky Aswal. (https://twitter.com/#!/VivekWickyAswal)
6+
* @git htt://github.com/indieteq-vivek/simple-db-class
7+
* @version 0.2a
8+
*
9+
*/
1010
require("Log.class.php");
1111
class DB
1212
{
@@ -28,7 +28,7 @@ class DB
2828
# @array, The parameters of the SQL query
2929
private $parameters;
3030

31-
/**
31+
/**
3232
* Default Constructor
3333
*
3434
* 1. Instantiate Log class.
@@ -42,11 +42,11 @@ public function __construct()
4242
$this->parameters = array();
4343
}
4444

45-
/**
45+
/**
4646
* This method makes connection to the database.
4747
*
48-
* 1. Reads the database settings from a ini file.
49-
* 2. Puts the ini content into the settings array.
48+
* 1. Reads the database settings from a ini file.
49+
* 2. Puts the ini content into the settings array.
5050
* 3. Tries to connect to the database.
5151
* 4. If connection failed, exception is displayed and a log file gets created.
5252
*/
@@ -75,7 +75,7 @@ private function Connect()
7575
die();
7676
}
7777
}
78-
/**
78+
/**
7979
* Every method which needs to execute a SQL query uses this method.
8080
*
8181
* 1. If not connected, connect to the database.
@@ -119,7 +119,7 @@ private function Init($query,$parameters = "")
119119
$this->parameters = array();
120120
}
121121

122-
/**
122+
/**
123123
* @void
124124
*
125125
* Add the parameter to the parameter array
@@ -130,7 +130,7 @@ public function bind($para, $value)
130130
{
131131
$this->parameters[sizeof($this->parameters)] = ":" . $para . "\x7F" . $value;
132132
}
133-
/**
133+
/**
134134
* @void
135135
*
136136
* Add more parameters to the parameter array
@@ -170,7 +170,7 @@ public function query($query,$params = null,$fetchmode = PDO::FETCH_ASSOC)
170170
return NULL;
171171
}
172172
}
173-
/**
173+
/**
174174
* Returns an array which represents a column from the result set
175175
*
176176
* @param string $query
@@ -191,7 +191,7 @@ public function column($query,$params = null)
191191
return $column;
192192

193193
}
194-
/**
194+
/**
195195
* Returns an array which represents a row from the result set
196196
*
197197
* @param string $query
@@ -204,7 +204,7 @@ public function row($query,$params = null,$fetchmode = PDO::FETCH_ASSOC)
204204
$this->Init($query,$params);
205205
return $this->sQuery->fetch($fetchmode);
206206
}
207-
/**
207+
/**
208208
* Returns the value of one single field/column
209209
*
210210
* @param string $query
@@ -216,7 +216,7 @@ public function single($query,$params = null)
216216
$this->Init($query,$params);
217217
return $this->sQuery->fetchColumn();
218218
}
219-
/**
219+
/**
220220
* Writes the log and returns the exception
221221
*
222222
* @param string $message

0 commit comments

Comments
 (0)