Welcome Guest, Not a member yet? Register   Sign In
Reading from database table
#9

[eluser]Altazar[/eluser]
I was trying to do that, but whatever I do, I get a blank page.

This is my model:
Code:
function get_harbour($lang_short)
  {
  $query = $this->db->get_where("harbours", array("lang_short" => $lang_short));
     if ( ! $query->num_rows())
   {
   return '';
   }
   return $query->row()->italy;  
  //$harbours = $this->db
  //->where('lang_short', $lang_short)
  //->get('harbours');
  //return $harbours;
  }

I've downloaded and installed Grocery CRUD, but its examples didn't help me. What I need is more simple.

First I want to read text from the table column ("Italy" in example) for the language which is in the URL ($lang_short).

Later I would like to have page for admin where I would display texts in textboxes for all languages and enable updating.


Messages In This Thread
Reading from database table - by El Forum - 04-08-2013, 09:25 AM
Reading from database table - by El Forum - 04-09-2013, 12:29 AM
Reading from database table - by El Forum - 04-09-2013, 01:04 AM
Reading from database table - by El Forum - 04-09-2013, 01:17 AM
Reading from database table - by El Forum - 04-09-2013, 01:27 AM
Reading from database table - by El Forum - 04-09-2013, 01:35 AM
Reading from database table - by El Forum - 04-09-2013, 03:41 AM
Reading from database table - by El Forum - 04-09-2013, 03:46 AM
Reading from database table - by El Forum - 04-20-2013, 07:36 AM
Reading from database table - by El Forum - 04-20-2013, 08:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB