Help with PostgreSQL |
[eluser]Gabriel Melo[/eluser]
Hello. I'm trying to develop an application with Codeigniter 2.1.2 and Postgre 8.3 on Windows Xp. I work with Xampp 1.6.7, Apache/2.2.9, PHP/5.2.6. Here's the database.php code: Code: $active_group = 'default'; I did a basic Model, Controller and view: Code Model: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Controller code Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); and the view code: Code: <html> So, when I try to test the results in the browser via http://localhost/sgi/index.php/test_postgre the app shows me this error message: Quote:A Database Error Occurred I don't know what is happening. It's my first project with Codeigniter and PostgreSQL. Thanks for help me. Gabo
[eluser]Unknown[/eluser]
[quote author="Gabriel Melo" date="1348265020"]So, anybody could help me ? xD Thanks[/quote] A Database Error Occurred Error Number: ERROR: relation “macroproceso” does not exist SELECT “macroproceso”.“nombre” FROM “macroproceso” Filename: D:\Dropbox\sgi\system\database\DB_driver.php Line Number: 330 A Guess. . .driver.php in D:\Dropbox? Should be root of host
[eluser]Gabriel Melo[/eluser]
[quote author="ktrollinger" date="1348277751"][quote author="Gabriel Melo" date="1348265020"]So, anybody could help me ? xD Thanks[/quote] A Database Error Occurred Error Number: ERROR: relation “macroproceso” does not exist SELECT “macroproceso”.“nombre” FROM “macroproceso” Filename: D:\Dropbox\sgi\system\database\DB_driver.php Line Number: 330 A Guess. . .driver.php in D:\Dropbox? Should be root of host [/quote] Ok, I work with alias in the httpd.conf, I mean for develop at job and in my home, so I put the folder projects inside the dropbox folder. I have other projects in CI in the same folder and work very good, no problem, with mysql connection.
[eluser]Gabriel Melo[/eluser]
I'm sorry very much for that all happened, It just was a mistake of typing :/ I fixed the error, this was the next line: Code: $db['default']['database'] = 'orfeo'; The really line should be: Code: $db['default']['database'] = 'sgi'; And the next line in the model was wrong too: Code: return $this->query->result(); It must be: Code: return $query->result(); And now the query works ok, shows me the records from the database. I was wrong with the database name, I'm sorry guys, I can't understand how we sometimes have mistakes and the days and hours pass and we can't find the errors. Thank you very much for all your support. Gabo. |
Welcome Guest, Not a member yet? Register Sign In |