• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
prepared statements

#1
[eluser]1cookie[/eluser]
hi

I have active record enabled in config.
Code:
$active_record = TRUE;

I can do it natively in PHP. But can someone show me how to:

Code:
$q = "SELECT username FROM users WHERE (email=? AND pass=?)";

$stmt = mysqli_prepare($dbc, $q);

if(! $stmt) echo mysqli_stmt_error($stmt);

mysqli_stmt_bind_param( $stmt, 'ss', $email, $pass );

mysqli_stmt_execute( $stmt );

in CI using the active record. Or offer an alternative solution the CI way?


Messages In This Thread
prepared statements - by El Forum - 12-12-2011, 08:18 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.