jppr Posted September 30, 2009 Share Posted September 30, 2009 Hi! i got somet doubt's... heres my code: function __construct(){ $strconn = "host= ?????? port=5432 user=XX password=XX dbname=XX"; $this->db = pg_connect($strconn); } what should i put on host = ?!!! help please.. thanks Quote Link to comment Share on other sites More sharing options...
Byron Posted September 30, 2009 Share Posted September 30, 2009 I'm not 100% sure but I believe it should be localhost Quote Link to comment Share on other sites More sharing options...
jppr Posted September 30, 2009 Author Share Posted September 30, 2009 i tried host=stevie.heliohost.org . and it seems it work... but now i got another problem: Warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "gpss" does not exist in /home/gpss2009/public_html/_classes/Banco.php on line 16 Warning: pg_fetch_assoc() expects parameter 1 to be resource, boolean given in /home/gpss2009/public_html/_classes/info.php on line 12 got this error messages, any help? :S Code: Banco.php line 16 error: function Query($sql){ $exec = pg_query($this->db, $sql); return $exec; } info.php line 12 error: $rs = $db->Query("select id_gpss, latitude from GPSS"); $row = pg_fetch_assoc($rs); Quote Link to comment Share on other sites More sharing options...
Ashoat Posted September 30, 2009 Share Posted September 30, 2009 Have you created the database you're connecting to? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.