lazaroskyr Posted January 3, 2007 Share Posted January 3, 2007 I wish to everyone a happy new year.Here is my "silly" question.I have this code:Code:[code]$conn = pg_connect(...) or die("Couldn't Connect: ".pg_last_error());if(something) {insert_something();}elseif(something else) {update_something();}function insert_something() {...some code...(works nice)}function update_something() {...some code...(cannot connect to db- i must reconnect)}[/code]I cannot understand what is the reason that in the second function I lose connection to postgres and must reconnect...Can anyone help me? Link to comment https://forums.phpfreaks.com/topic/32684-solved-php-and-postgres-connection/ Share on other sites More sharing options...
trq Posted January 3, 2007 Share Posted January 3, 2007 Post your actuall code. Link to comment https://forums.phpfreaks.com/topic/32684-solved-php-and-postgres-connection/#findComment-152112 Share on other sites More sharing options...
lazaroskyr Posted January 3, 2007 Author Share Posted January 3, 2007 Thanks.I've solved it.It was a stupid mistake. Link to comment https://forums.phpfreaks.com/topic/32684-solved-php-and-postgres-connection/#findComment-152118 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.