Welcome Guest, Not a member yet? Register   Sign In
update_string not working correctly
#1

[eluser]cmgmyr[/eluser]
Hello all,
I've been having a problem with the update_string function and I can't seem to find the problem.

I have:
Code:
$data = array('location' => $location,
                      'student_provider' => $student_provider,
                      'profession' => $profession,
                      'employer' => $employer,
                      'college' => $college,
                      'year_started' => $year_started,
                      'bio' => $bio,
                      'gender' => $gender,
                      'dob' => $dob,
                      'interests' => $interests,
                      'family' => $family,
                      'awards' => $awards);
        $this->db->query($this->db->update_string('users_profile', $data, "id = ".$this->db->escape($id)));

And I'm getting the following error:
Code:
A Database Error Occurred

Error Number: 1064

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 'a small section where I can fill out things about my interests., `family` = This' at line 1

UPDATE `users_profile` SET `location` = 'Test, NY', `student_provider` = 'p', `profession` = 'Web Designer', `employer` = 'Test Company', `college` = 'Test School', `year_started` = '2008-01-01', `bio` = 'This is a small section where I can fill out things about me.', `gender` = 'm', `dob` = '1985-03-13', `interests` = This is a small section where I can fill out things about my interests., `family` = This is a small section where I can fill out things about my family., `awards` = This is a small section where I can fill out things about my awards. WHERE id = '1'

As you can see the 'bio' is getting the quotes on it, but the last 3 long strings are not getting the quotes. Anyone have any ideas about this?

Thanks in advance,
-Chris
#2

[eluser]cmgmyr[/eluser]
anyone?
#3

[eluser]akkumaru[/eluser]
i cannot see something wrong with the code you submitted,,

i tried the code and nothing's wrong,,
#4

[eluser]cmgmyr[/eluser]
I just don't understand why this is happening though. I went ahead and used a "standard" query to bypass this, but it just doesn't make any sense. Very strange.




Theme © iAndrew 2016 - Forum software by © MyBB