[eluser]BoyBlue[/eluser]
Ok, so I'm officially feeling defeated with the current way I'm trying to insert specific data from an existing table into a newly created table...
(And, I've been getting AMAZING help from this forum in trying to solve it [InsiteFX you are a total stud for trying to save a flatlined summer-student!]; but I think I've screwed something up so badly that it's probably best for me to admit defeat and start over from scratch)
Here is my current "problem-code" in the Model for trying to insert specific data from an existing table("games") into a newly created table("$table_name"):
Code:
function get_game_data($table_name)
{
$this->db->select('game_id, base_number');//Table item(s)
$game_data = $this->db->get('games');//name of table in database
if ($game_data->num_rows > 0)
{
$this->db->select('game_id, base_number');//Table item(s)
$this->db->insert($table_name, $game_data);//name of table in database and items to insert
}
Can someone please point me in the right direction regarding the best markup you've found for inserting specific data from an existing table into a newly created table with no data in it.
thanks