Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-17-2010, 02:01 AM   PM User | #1
twobyfour
Regular Coder

 
Join Date: May 2010
Posts: 140
Thanks: 7
Thanked 0 Times in 0 Posts
twobyfour has a little shameless behaviour in the past
table 'foo.foofoo' doesn't exist

i am trying to include a config file for another script but it keeps trying to use the previous config file for the script. how can i require both of them on the same page.

PHP Code:
require ("config.php");
require (
"config2.php"); 
does not work. it produces this "table 'foo.foofoo' doesn't exist"
twobyfour is offline   Reply With Quote
Old 05-17-2010, 02:12 AM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
We need to see what is in those config files. Remove any sensitive data before showing us though.
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 05-17-2010, 02:55 AM   PM User | #3
twobyfour
Regular Coder

 
Join Date: May 2010
Posts: 140
Thanks: 7
Thanked 0 Times in 0 Posts
twobyfour has a little shameless behaviour in the past
config.php

PHP Code:
//set up the names of the database and table
$db_name ="_";

//connect to the server and select the database
$server "_";
$dbusername "_";
$dbpassword "_"
config2.php

PHP Code:
$username "_";
 
$password "_";
 
$hostname "_";
        
 
$dbname ""
ofcourse each var is different
twobyfour is offline   Reply With Quote
Old 05-17-2010, 04:08 AM   PM User | #4
twobyfour
Regular Coder

 
Join Date: May 2010
Posts: 140
Thanks: 7
Thanked 0 Times in 0 Posts
twobyfour has a little shameless behaviour in the past
i got it fiqured out,

i had to close the connection to the first table, open a new connection to the second table and close it, then had to reopen the first connection to continue the rest of the script.
twobyfour is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:44 PM.


Advertisement
Log in to turn off these ads.