Welcome Guest, Not a member yet? Register   Sign In
Database Query Problem please help
#1

[eluser]gork7478[/eluser]
I have this problem and I'm trying to figure out what I'm doing wrong. I like to write out my queries, my own personal preference of course. If I do this:
Code:
$this->db->where('key', $key);
$query = $this->db->get('temp_users');
It works fine no problem.
But if I do this
Code:
$sql = 'SELECT * FROM temp_users WHERE key=? LIMIT 1';
$query = $this->db->query($sql, array('key' => $key));
It tells me to check my MySql syntax. Please tell if these two bits of code don't do the same thing.


Messages In This Thread
Database Query Problem please help - by El Forum - 04-29-2013, 05:39 AM
Database Query Problem please help - by El Forum - 04-29-2013, 05:55 AM
Database Query Problem please help - by El Forum - 04-29-2013, 06:34 AM
Database Query Problem please help - by El Forum - 04-29-2013, 07:00 AM
Database Query Problem please help - by El Forum - 04-29-2013, 07:07 AM
Database Query Problem please help - by El Forum - 04-29-2013, 08:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB