Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If i understand you correct, why don't you add another where statement after the like statements. something like this:</p> <pre><code>function get_search($match,$postcode) { $this-&gt;db-&gt;like('Bedrijfsnaam', $match); $this-&gt;db-&gt;or_like('Postcode', $match); $this-&gt;db-&gt;or_like('Plaats', $match); $this-&gt;db-&gt;or_like('Telefoonnummer', $match); $this-&gt;db-&gt;or_like('Email', $match); $this-&gt;db-&gt;or_like('Website', $match); $this-&gt;db-&gt;or_like('Profiel', $match); $this-&gt;db-&gt;or_like('Adres', $match); $this-&gt;db-&gt;or_like('Categorie', $match); </code></pre> <p>$this->db->where("postcode",$postcode);</p> <pre><code> $this-&gt;db-&gt;join('bedrijven', 'bedrijfcategorieen.idbedrijven = bedrijven.idbedrijven'); $this-&gt;db-&gt;join('categorieen', 'bedrijfcategorieen.idcategorieen = categorieen.idcategorieen'); $this-&gt;db-&gt;group_by('bedrijfcategorieen.idbedrijven', 'bedrijfcategorieen.idcategorieen'); $query = $this-&gt;db-&gt;get('bedrijfcategorieen'); return $query-&gt;result(); } </code></pre> <p>update:</p> <p>is your cookie set? and can you get the value properly? try this next scripts as controller. is should echo the cookie value to the screen. maybe it already goes wrong fetchhing the cookie value.</p> <pre><code> $match = $this-&gt;input-&gt;post('search'); $match2 = $this-&gt;input-&gt;cookie('postcode'); echo "cookie value = ".$match2; $data['query'] = $this-&gt;bedrijven_model-&gt;get_search($match, $match2); $this-&gt;load-&gt;view('views/header'); $this-&gt;load-&gt;view('views/searchresults', $data); $this-&gt;load-&gt;view('views/footer'); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload