Welcome Guest, Not a member yet? Register   Sign In
Query Problems - Should be a Simple Fix
#4

[eluser]Armchair Samurai[/eluser]
To be honest, there are a few things which I wouldn't consider "best practice" when looking at the code, but the most immediate thing is that you are using the db library incorrectly - you need to change your syntax when generating a db result:

Code:
$query = $this->db->query('SELECT password FROM users WHERE username = ?', array($username));
$result = $query->row(); // You should only need a single row for the result

if ($result->password == $_POST['password']):
// continue on here....


Messages In This Thread
Query Problems - Should be a Simple Fix - by El Forum - 10-19-2008, 11:48 AM
Query Problems - Should be a Simple Fix - by El Forum - 10-19-2008, 12:27 PM
Query Problems - Should be a Simple Fix - by El Forum - 10-19-2008, 03:06 PM
Query Problems - Should be a Simple Fix - by El Forum - 10-19-2008, 06:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB