Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6c89faa

Browse files
Merge pull request #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)

AltStyle によって変換されたページ (->オリジナル) /