Welcome Guest, Not a member yet? Register   Sign In
New CI User - need assistance with Model issue please.
#11

[eluser]Mirge[/eluser]
I just tested the UNMODIFIED code... here it is again for convenience:

Code:
<?php

class Site_model extends CI_Model
{
    function getAll()
    {
        //$this->CI = get_instance();
        
        //$this->CI->load->database();
        $q = $this->db->get('test');
        
        if($q->num_rows() > 0)
        {
            foreach($q->result() as $row)
            {
                $data[] = $row;
            }
            
            return $data;
        }
    }
}

Tested on my remote server, instead of XAMPP 1.7.4......... and it worked. Soooo... something is wrong with my XAMPP install I guess?? I had followed the "Create a blog in 20 minutes" tutorial partially.. it accessed DB on my XAMPP server just fine there using the exact same database.php file, etc... so strange. Makes me wonder what's up with my XAMPP install now.

Ah well... maybe a reboot will fix it LOL, j/k.

Thanks for your help! I appreciate it. I will test more thoroughly on my end before posting questions in future.
#12

[eluser]InsiteFX[/eluser]
Your very Welcome and no problem!

InsiteFX
#13

[eluser]Mirge[/eluser]
doh, a reboot DID fix it....... :O

now i feel like an even bigger doofus.. sigh. thanks!
#14

[eluser]Mirge[/eluser]
Follow-up..... it stopped working.

A bit of Google'ing turned up a gem saying readme says Win7 64-bit NOT supported. So, uninstalled 1.7.4 and installing 1.7.3 now, same version you're running. Bet it works flawlessly after this... will edit this post once it finishes installing, etc.

EDIT: still not working. ugh.

EDIT AGAIN: Removed my entire codeigniter/ folder, re-downloaded fresh..... now it works. NO clue what happened, but it works again with 1.7.3. Hurray!




Theme © iAndrew 2016 - Forum software by © MyBB