Skip to content

Commit 6c89faa

Browse files
committed
Merge pull request a1phanumeric#11 from sajhu/master
Added param to set the columns selected in ->Select fn
2 parents 8c8106b + 8fd37e0 commit 6c89faa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

class.MySQL.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,13 @@ function Delete($table, $where='', $limit='', $like=false){
193193

194194

195195
// Gets a single row from $from where $where is true
196-
function Select($from, $where='', $orderBy='', $limit='', $like=false, $operand='AND'){
196+
function Select($from, $where='', $orderBy='', $limit='', $like=false, $operand='AND',$cols='*'){
197197
// Catch Exceptions
198198
if(trim($from) == ''){
199199
return false;
200200
}
201201

202-
$query = "SELECT * FROM `{$from}` WHERE ";
202+
$query = "SELECT {$cols} FROM `{$from}` WHERE ";
203203

204204
if(is_array($where) && $where != ''){
205205
// Prepare Variables

0 commit comments

Comments
 (0)