Welcome Guest, Not a member yet? Register   Sign In
Menus and Other
#5

[eluser]Gewa[/eluser]
you didn;t get me.

Lets say we have in our catalog.php controller function detailed() which shows the description of item....

Code:
function detailed($lid){


if(!$lid){
     exit("Please don;t play with URL");
     }




$query=$this->db->query("SELECT * FROM `lokal` WHERE `lid` = '$lid'");
                   if($query->num_rows()==0){

                     $this->load->view('header',$data);
                    $this->load->view('topmenu');
                     $this->load->view('menu');

                     echo" There is no such place with ID $lid";
                     exit;
                     }

                    if ($query->num_rows() > 0)
                         {
                            $data= $query->row_array();

                            }


                       $this->load->helper('date');
                     $datestring = "Year: %Y Month: %m Day: %d - %h:%i %a";
                       $time = time();
                       $data['zhamanak']=mdate($datestring, $time);
                        $data['city']="Vienna";
                        $data['subcategory']="Restoran";


                    $this->load->view('header',$data);
                    $this->load->view('topmenu');
                     $this->load->view('menu');
                     $this->load->view('detailed',$data);
                          $this->load->view('footer');
                 }


lets say i want to add internationalisation



what i do? I should have right $language to make such query

$query=$this->db->query("SELECT * FROM `lokal` WHERE `lid` = '$lid' AND lang='$language'");



which function will give me this $language, which is set in URI?


how to determine it inside the function?


Messages In This Thread
Menus and Other - by El Forum - 04-26-2008, 04:43 AM
Menus and Other - by El Forum - 04-26-2008, 04:54 AM
Menus and Other - by El Forum - 04-26-2008, 04:58 AM
Menus and Other - by El Forum - 04-26-2008, 05:09 AM
Menus and Other - by El Forum - 04-26-2008, 05:15 AM
Menus and Other - by El Forum - 04-26-2008, 05:18 AM
Menus and Other - by El Forum - 04-26-2008, 05:46 AM
Menus and Other - by El Forum - 04-26-2008, 05:49 AM
Menus and Other - by El Forum - 04-26-2008, 05:51 AM
Menus and Other - by El Forum - 04-26-2008, 05:53 AM
Menus and Other - by El Forum - 04-26-2008, 05:55 AM
Menus and Other - by El Forum - 04-26-2008, 05:58 AM
Menus and Other - by El Forum - 04-26-2008, 05:58 AM
Menus and Other - by El Forum - 04-26-2008, 11:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB