[eluser]mousewonders[/eluser]
I am very new to CI. Just started playing with it tonight. I am trying to create a event manager.
I am trying to pull data from a database to be editted. This is what I have so far..
Code:
function edit()
{
$getid = $this->uri->segment(4); // This line gets the ID of the event to edit...
$where = 'event_id = $getid'; // I am sure there is a better way.. but this is my where clause.
$data['query'] = $this->db->get('events', $where); // I believe pulls the row.
$query->result() as $row:; // This doesnt work... not sure how to pull without a foreach.
echo form_input('username', $row->event_title);// Here I want the form to be created with the values filled in from the database...
}
I currently have only two fields that I need created that is event_title and event_details.
I believe everything up to $query->result is working.... I think... anyways.. Thanks for your assistance.
Richard