Prepared statements in CI - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Prepared statements in CI (/showthread.php?tid=53555) |
Prepared statements in CI - El Forum - 07-29-2012 [eluser]alvaroeesti[/eluser] Hi! In my usual PHP I have this here below, but I think CI has most of that code built in and I don't have to complete it all. The question is how much it is built it of this snippet ? Code: CRYPT_BLOWFISH or die ('No Blowfish found.'); So once I get the salt and the password, I can reconstrue the hashed password and compare it with the one that is on the table. If equal, log him in. But, using CI, I think the steps from 5 to 8 both included are not needed. Looks like it would be just followed by something like: Code: $result = $this->db->query($query_str, array($salt, $password); And then I would have to use the CI syntax to read those $salt and $password from $result, that is the values that are on the table of the Database. But I don't know the syntax to read that $result in the CI environment, Prepared statements in CI - El Forum - 07-29-2012 [eluser]skunkbad[/eluser] Code: $sql = "SELECT salt, password FROM users WHERE email=?"; Prepared statements in CI - El Forum - 07-29-2012 [eluser]alvaroeesti[/eluser] Thank you,! I will implement that. So that means that indeed CI has the steps 5-8 built-in. thanks a lot |