Welcome Guest, Not a member yet? Register   Sign In
header white Data
#4

(This post was last modified: 10-14-2017, 07:52 AM by PaulD.)

You should always check a foreach variable is not empty before doing the foreach loop. The error is telling you your variable is not set. If it is not set, but you are trying to set it with your model call, then your model must not be returning the values you expected.

Looking at your models called function, which looks fine, are you sure you have any data in the table you refer to?

PS You could write it like this btw:
PHP Code:
public function header_warenkorbs()
{
      return 
$this->db->select('*')
            ->
from('db_artikel')
            ->
get()
            ->
result_array();


And since select * is the default, and get accepts a table name, you could do:

PHP Code:
public function header_warenkorbs()
{
      return 
$this->db->get('db_artikel')->result_array();


Paul
Reply


Messages In This Thread
header white Data - by Germanikus - 10-13-2017, 11:39 AM
RE: header white Data - by InsiteFX - 10-13-2017, 03:28 PM
RE: header white Data - by Germanikus - 10-13-2017, 09:26 PM
RE: header white Data - by PaulD - 10-14-2017, 07:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB