Welcome Guest, Not a member yet? Register   Sign In
Help for php newbie, getting db error 1064 on update
#2

[eluser]Unknown[/eluser]
Ok, thought i would let you people know i found the answer, it may help someone.

If i swap this line:

Code:
$desc_to_store = $loadxml->Descriptions->Description->Value;


with this

Code:
$desc_to_store = (string) $loadxml->Descriptions->Description->Value;

this now works:
Code:
$data = array('desc' => $desc_to_store);
$this->db->where('id', $id);
$this->db->update('lrhotel', $data);

$desc_to_store needed to be converted from an object to a string.


Messages In This Thread
Help for php newbie, getting db error 1064 on update - by El Forum - 02-06-2010, 11:04 AM
Help for php newbie, getting db error 1064 on update - by El Forum - 02-06-2010, 12:06 PM



Theme © iAndrew 2016 - Forum software by © MyBB