Welcome Guest, Not a member yet? Register   Sign In
Something messed up with foreach as $item
#9

[eluser]Lockzi[/eluser]
Code:
function checkNewFeed($link = null)
    {
        // Just checking for empty queries!
        if ($link == null)
        {
            die('Link is empty!');
        }    
        
        $query = $this->db->select('link')->from('news')->where('link', $link);
        $res = $this->db->get();
        
        if ($res->num_rows() == 0)
        {
            return TRUE;
        }
        else {
            return FALSE;
        }
        
    }
Code:
function insertNewFeed($feed = null, $title = null, $link = null, $description = null)
    {
        // Just checking for empty queries!
        if ($title == null)
        {
            die('Title is empty!');
        }
        
        if ($link == null)
        {
            die('Link is empty!');
        }
        
        if ($description == null)
        {
            die('Description is empty!');
        }
        
        $queryData = array(
            'feed'    => $feed,
            'title'    => $title,
            'link'    => $link,
            'descr'    => $description
            );
        
        return $this->db->insert('news', $queryData);
        
    }


Messages In This Thread
Something messed up with foreach as $item - by El Forum - 09-13-2007, 05:05 PM
Something messed up with foreach as $item - by El Forum - 09-13-2007, 06:27 PM
Something messed up with foreach as $item - by El Forum - 09-14-2007, 01:08 AM
Something messed up with foreach as $item - by El Forum - 09-14-2007, 01:16 AM
Something messed up with foreach as $item - by El Forum - 09-14-2007, 01:23 AM
Something messed up with foreach as $item - by El Forum - 09-14-2007, 04:27 AM
Something messed up with foreach as $item - by El Forum - 09-14-2007, 04:31 AM
Something messed up with foreach as $item - by El Forum - 09-14-2007, 08:28 AM
Something messed up with foreach as $item - by El Forum - 09-14-2007, 10:30 AM
Something messed up with foreach as $item - by El Forum - 09-14-2007, 11:38 AM
Something messed up with foreach as $item - by El Forum - 09-14-2007, 12:41 PM
Something messed up with foreach as $item - by El Forum - 09-14-2007, 01:30 PM



Theme © iAndrew 2016 - Forum software by © MyBB