Welcome Guest, Not a member yet? Register   Sign In
retrieve data from db
#11

[eluser]HugoA[/eluser]
jmadsen,

i did everything you tell me in your post but i can make this to work. If i comment all the lines that have something to do with the db i can see the message "La vista fue cargada" because basically mi controller only render the view.

I think the error has something to do with the database and this line in the autoload.php file
$autoload['libraries'] = array('database');

If i replace that line with
$autoload['libraries'] = array();
i can see the message

but if i use array('database') i just see a white page.

So

this is the view

Code:
<html>
<head>
    <title>Home</title>
</head>
<body>

<p>La vista fue cargada</p>
&lt;/body&gt;

and the controller
Code:
&lt;?php
class Site extends Controller{
    function index(){
        //$this->load->model(');
        //$data['records'] = $this->Site_model->getAll();
        $this->load->view('home');
    }  
}
?&gt;

With $autoload['libraries'] = array(); i can see the message in the page. With $autoload['libraries'] = array('database'); i can't

PD:Thank you all for your time and help.
#12

[eluser]wowdezign[/eluser]
Hugo, that autoload line looks correct to me. I don't think it is the problem. It sounds like you have something wrong with the database configuration. Smile
#13

[eluser]HugoA[/eluser]
Problem Solve!
there is a file call php.ini
and you have to set this lines:

extension=php_mysql.dll
extension_dir = "C:\Archivos de programa\php\ext"

that way php can talk to mysqls.
:coolsmirk:

I'm new to this php apache thing.....
#14

[eluser]wowdezign[/eluser]
Alright!!! Glad to hear it! :-)
#15

[eluser]2think[/eluser]
HugoA, jmadsen,

Sorry HugoA, jmadsen is right and I was woefully wrong. I took a quick look and after not seeing anything wrong with the code figured it to be a misplaced something (as I've often done).

Apologies and glad to know you figured it out - without help too although there were good intentions all round. %-P




Theme © iAndrew 2016 - Forum software by © MyBB