Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Navigation
Latest Addons
AD Gallery 66
SyntaxHighlighte... 51
Newsletters v4.03 114
Facebook Like Box 132
Newsletters v4.02 60
Metro 171
Facebook Connect 173
Shoutbox Panel 129
Redactor for PHP... 107
MI Floating Side... 109
Facebook Login/R... 156
Avatar Studio v2.03 180
Relationship Sta... 98
Sexual Orientati... 116
Fisherman 144
Popular Addons
iTheme2 5808
Arise 5808
User Control v1.23 4623
Event Calendar 4055
Photowidget panel 3888
Radio-Theme red2... 3359
Highslide Gallery 3315
CSS/JavaScript D... 3234
Facebook Connect... 2992
Dynamic Menu 2895
Slideshow Lightb... 2729
L-AMANT 2662
Enigma 2637
2Dark 2608
Black 2580
View Thread
Official Home of PHP-Fusion » General Addon and Modification Support » Code Snippet and functions
Who is here? 1 guest(s)
 Print Thread
mysql close and open
Jebajseti
Hi,

i am adding ip2country to my site, It works but i have problem in profile.php

if i do not use close(); then i get all over the site No database selectedNo databaseNo database selectedNo database etc etc

ofcourse only from that script down

if i do close(); i do not get that errors arround but ofcourse it closes mysql connection so also i do not get any forward data.

What would be the best solution for this matter?

code added into profile.php:


include_once INCLUDES."ip2c/ip2country.php";

echo $ip2c->get_country_name($user_data['user_ip']);


which works, I get country name of user displayed.

Database is different its not php fusion database, because i do not want to have it in same database.

source code: http://phpweby.co...ip2country

p.s. i have changed db connect and replaced all over the file with additional #2 so it wouldnt beat with config.php same variables


public $mysql_host2='localhost';
public $db_name2='xxx';
public $db_user2='xxx';
public $db_pass2='xxx';
public $table_name2='xxx';
 
Craig
Wrong forum.
 
http://www.fusiontube.co.uk/
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
resetting the mySQL db to all defaults? Content Administration 4 08-04-2013 20:00
MYSQL Data Outputs on Custom Pages Content Administration 7 07-04-2013 22:56
Panel with MYsql data error Panels and Infusions 1 06-04-2013 06:00
Mysql truble with ADDONS Installation Issues 5 18-02-2013 03:54
Forum poll close Content Administration 5 02-02-2013 00:19
Official Home of PHP-Fusion uses cookies. Some may already have been set. Read more about our Cookies here.
Please click the button I Consent Cookies to hide this bar and accept our cookies. If you continue to use the site with no action taken, we'll assume that you consent our cookies anyway.
Cookiebar Panel byVenue