0
// Gets a single row from $from where $where is true    
    function Select($from, $where='', $orderBy='', $limit='', $like=false, $operand='AND',$cols='*'){

Let's say I created the object  - 
$oMySQL = new MySQL();

$oMySQL->Select();

if I was doing this query - SELECT * FROM users where email='$email'"

I can do insert and all the others - But I am confused how to make the select();

Thanks for the help.

1
  • $oMySQL.Select('tbl', "tbl.field = 'value'", 'tbl.name', '0,25'); Commented Jul 27, 2013 at 16:08

1 Answer 1

1

Since i do not know how the Select function is implemented i would assume something like this:

$oMySQL->Select('users', "email='$email'");
Sign up to request clarification or add additional context in comments.

2 Comments

Don't forget to escape values that come from users. You can mysql_real_escape_string. Or end up using something like MySQL PDO or MySQLi since they allows for parametized expressions.
Yes that is right. I should have mentioned that. But since this looks like a framework method, i assumed that this is the case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.