Welcome Guest, Not a member yet? Register   Sign In
DB Problem with CI 2.1.1
#1

[eluser]cmh24[/eluser]
Hi everybody,

just upgraded to CI 2.1.1 (like described in the userguide).

Now I have the following problem with my database. I want to get all users who uploaded a photo. That means it is not empty.

Code:
$data['users'] = $this->db->where('user_photo !=', '')->get('users')->result();

But it does not work. With CI 2.1 it worked. Now I get an error message.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`!=` ''' at line 3

SELECT * FROM (`users`) WHERE `user_photo` `!=` ''

What changed?

Looking forward to any help.

Best regards!
Max


Messages In This Thread
DB Problem with CI 2.1.1 - by El Forum - 06-13-2012, 02:02 AM
DB Problem with CI 2.1.1 - by El Forum - 06-13-2012, 02:53 AM
DB Problem with CI 2.1.1 - by El Forum - 06-13-2012, 05:20 AM
DB Problem with CI 2.1.1 - by El Forum - 06-13-2012, 06:42 AM
DB Problem with CI 2.1.1 - by El Forum - 06-13-2012, 07:18 AM
DB Problem with CI 2.1.1 - by El Forum - 06-13-2012, 07:24 AM
DB Problem with CI 2.1.1 - by El Forum - 06-14-2012, 03:29 AM
DB Problem with CI 2.1.1 - by El Forum - 06-14-2012, 07:23 AM
DB Problem with CI 2.1.1 - by El Forum - 06-14-2012, 07:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB