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? Quote 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. Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.