Welcome Guest, Not a member yet? Register   Sign In
SQL Injections
#1

I would like to know if the Query Builder Class is safe in terms of SQL Injections.

How should they be used correctly to avoid these attacks?
I have this situation:
Code:
$product    =  $this->productModel->asObject()->find( $id );

And this other:
Code:
$sql        =  'SELECT * FROM products WHERE id = ?';
$products   =  $this->db->query( $sql, [ 1 ] )->getResultObject();


Which would be the safest?
Reply


Messages In This Thread
SQL Injections - by miscapu - 01-24-2023, 06:15 AM
RE: SQL Injections - by kenjis - 01-24-2023, 05:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB