Welcome Guest, Not a member yet? Register   Sign In
Help with GET
#1

Hello, everybody,
I have a problem with the GET.
I want to transfer three values where two values are present or not (where_or).
But somehow none of the values are transferred and I don't know why.

IMG:
https://screenshots.firefox.com/g6qcToRn.../127.0.0.1

Controller:
PHP Code:
        public function index($slug) {
            
$url 'edition/index';
            
$array explode ('/',$url);
            
$data['array'] = $array[0];
            
$data['title'] = 'Edition Liste';
            
$data['edition_listes'] = $this->Edition_model->edition_listess($slug);
            
$this->load->view('templates/header'$data);
            
$this->load->view($url$data);
            
$this->load->view('templates/footer');
        }
        public function 
edition($tcg,$id,$short) {
            
$url 'edition/edition';
            
$array explode ('/',$url);
            
$data['array'] = $array[0];
            
$data['get_edition'] = $this->Edition_model->get_edition($tcg,$id,$short);
            
$this->load->view('templates/header'$data);
            
$this->load->view($url$data);
            
$this->load->view('templates/footer');
        } 

Model
PHP Code:
        public function edition_listess($slug) {
            
$this->db->select('*');
            
$this->db->from('db_edition');
            
$this->db->where('db_edition.tb_edition_tcg'$slug);
            
$this->db->order_by('db_edition.tb_edition_kurzel''ASC');
            
$this->db->order_by('db_edition.tb_edition_date''ASC');
            
$query $this->db->get();
            return 
$query->result_array();
        }
        public function 
get_edition($tcg,$id,$short) {
            
$this->db->select('*');
            
$this->db->from('db_edition');
            
$this->db->where('db_edition.tb_edition_tcg'$tcg);
            
$this->db->where('db_edition.tb_edition_id'$id);
            
$this->db->or_where('db_edition.tb_edition_kurzel'$short);
            
$this->db->order_by('db_edition.tb_edition_kurzel''ASC');
            
$this->db->order_by('db_edition.tb_edition_date''ASC');
            
$query $this->db->get();
            return 
$query->result_array();
        } 

index.php
Code:
<?php echo validation_errors(); ?>
<title><?php echo $title; ?></title>

<div class="row">
    <div class="col-xs-6 col-lg-1">
    </div>
    <div class="col-xs-6 col-lg-10">
<?php foreach ($edition_listes as $edition_liste): ?>
        <div class="list-group">
            <a href="<?php echo base_url(); ?>edition/edition/<?php echo $edition_liste['tb_edition_tcg'];?>/<?php if($edition_liste['tb_edition_kurzel'] > '') { echo $edition_liste['tb_edition_kurzel']; } else { echo $edition_liste['tb_edition_id']; } ?>" class="list-group-item list-group-item-action list-group-item-secondary">
                <div class="media">
                    <img class="media-object img-rounded img-responsive" ¬†src="<?php echo base_url(); ?>/assets/images/display.png" alt="placehold.it/350x250">
                    <div class="media-body">
                        <h4 class="list-group-item-heading"><?php echo $edition_liste['tb_edition_name'];?></h4>
                            <p class="list-group-item-text">
                                <b>SET ID: </b><?php if($edition_liste['tb_edition_kurzel']): echo $edition_liste['tb_edition_kurzel']; endif; ?></br>
                                <b>Kartenmenge: </b><?php echo $edition_liste['tb_edition_size'];?></br>
                                <b>Release: </b>00.00.0000
                            </p>
                    </div>
                    <div class="col-md-3 text-right">
                        <h5 class="colors">Pre-Release: <button class="btn btn-primary"><i class="fa fa-check-square"></i></button></h5>
                        <h5 class="colors">Pre-Release: <button class="btn btn-primary"><i class="fa fa-square"></i></button></h5>
                    </div>
                </div>
            </a>
        </div>
<?php endforeach; ?>
    </div>
    <div class="col-xs-6 col-lg-1">
    </div>
</div>

edition.php (test page)
Code:
<?php echo validation_errors(); ?>
<?php echo $slug; ?>
Reply


Messages In This Thread
Help with GET - by Germanikus - 05-12-2019, 01:31 AM
RE: Help with GET - by DELE - 05-12-2019, 07:40 AM
RE: Help with GET - by Wouter60 - 05-12-2019, 09:57 AM
RE: Help with GET - by InsiteFX - 05-13-2019, 02:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB