Subject: How to return rows as not ReadOnly
I'm trying to retrieve a row based on the value of a column so I can then update it, but it's throwing an error about being read only, how should I do this?
[[
$sql = "select * from `blm_media_image` WHERE media_image = '" . $media_image . "'"; $dbBlmMediaImage = BlmMediaImage::find_by_sql($sql); //$dbBlmMediaImage = BlmMediaImage::find('first', array('conditions' => array('media_image=?', $media_image) ) ); print_r($dbBlmMediaImage); # UPDATE $dbBlmMediaImage->update_attributes( array( 'agent_ref' => $blmProperty['AGENT_REF'], 'media_image' => $media_image, 'media_image_text' => $media_image_text ) );
Thanks
June 27 2010
April 16, 2013
Subject: How to return rows as not ReadOnly
I'm trying to retrieve a row based on the value of a column so I can then update it, but it's throwing an error about being read only, how should I do this?
[[
]]
Thanks