Welcome Guest, Not a member yet? Register   Sign In
Updating data on another DB - is that possible?
#7

[eluser]red2034[/eluser]
I see your point: I have re-worked the code as such which keeps all the actions in the same DB:

view page code:
Code:
<a href="&lt;?php echo base_url();?&gt;;index.php?student/classes/launch/&lt;?php echo $row['class_id'];?&gt;" class="btn btn-gray btn-small">
                                    <;?php echo get_phrase('launch');?&gt;;
                                    </a>

and controller code:
Code:
if ($param1 == 'launch') {
        $class_info = $this->db->get_where('class' , array('class_id' => $param2))->row_array();
        $data['status'] = 'in-progress';
        $this->db->where('class_id', $param2);
        $this->db->update('class', $data);

        $class_link = $class_info['deep_link'];
        anchor($class_link, 'title="title"', array('target' => '_blank', 'class' => 'new_window'));
     }

this fixes the 'status' columns problem but it just opens the current page in the same window instead of opening $class_info['deep_link']; in a new window

Thanks for the help!


Messages In This Thread
Updating data on another DB - is that possible? - by El Forum - 02-15-2014, 09:36 AM
Updating data on another DB - is that possible? - by El Forum - 02-15-2014, 09:50 AM
Updating data on another DB - is that possible? - by El Forum - 02-15-2014, 11:03 AM
Updating data on another DB - is that possible? - by El Forum - 02-15-2014, 11:29 AM
Updating data on another DB - is that possible? - by El Forum - 02-15-2014, 11:52 AM
Updating data on another DB - is that possible? - by El Forum - 02-16-2014, 12:31 AM
Updating data on another DB - is that possible? - by El Forum - 02-16-2014, 09:15 AM
Updating data on another DB - is that possible? - by El Forum - 02-16-2014, 10:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB