Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Other
Author Message
wHiTeHaT
Life Cycles Becoming CPU Cycles



Joined: Jul 18, 2004
Posts: 579

PostPosted: Mon Jul 13, 2009 7:02 am Reply with quote

Maby this sounds stupid , but i'm on to test something and think if what i trying to do is posseble , then the rest will work to.

i'm planning to terminate the sql layer including before a script starts , and when the script ends, start the original sql layer including again.

Is this posseble , ifso.. you know how or simply point me into a good direction.

The following scenario is what i intend:

run default nuke code , inside there's a block activated what requires a different mysql.php execution , the point is , the functions are almost the same as in nuke , and it isnt posseble to edit this other mysql.php withouth breaking the rest of the code outside nuke.

If i aint clear enough simply tell what you think and try to do.. and ask if you are right.
 
View user's profile Send private message Send e-mail
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Mon Jul 13, 2009 6:48 pm Reply with quote

You should be able to run mysql_connect on two links - to do connections to two different databases. I don't understand why you need to do this within two SQL layers though. What is the intended result?

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
wHiTeHaT







PostPosted: Tue Jul 14, 2009 12:06 am Reply with quote

Forget my question.. what i try to do is not posseble.
php doesnt allow to exclude/unload an included file
 
floppydrivez
Involved
Involved



Joined: Feb 26, 2006
Posts: 340
Location: Jackson, Mississippi

PostPosted: Tue Jul 14, 2009 3:16 am Reply with quote

wHiTeHaT wrote:
Forget my question.. what i try to do is not posseble.
php doesnt allow to exclude/unload an included file


Maybe if you shared your intentions someone could assist you in a possible route.

_________________
Only registered users can see links on this board! Get registered or login!, Only registered users can see links on this board! Get registered or login!, Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
wHiTeHaT







PostPosted: Tue Jul 14, 2009 3:25 am Reply with quote

i wanted to load a forum block for phpbb3, and for this special block go around root/db/mysql.php
and use root/forum/includes/db/mysql.php

so idea was:

run nuke & permitted content
stop default nuke mysql.php
use forum mysql.php
The forum block content
stop use forum mysql.php
start default nuke mysql.php

i already tested it and it cant work as i thought.
 
floppydrivez







PostPosted: Tue Jul 14, 2009 3:27 am Reply with quote

You don't need to do that. If it is in a different database, make another connection (you can get this code from mainfile.php) and retrieve the info for the block (be sure you close that connection). If it is in the same database, just write the block like any other.

I hope that makes sense. BTW, when making that connection don't use any variables that are already in use like $db or $prefix.

Something like this should get you connected.

Code:
$db2 = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
 
wHiTeHaT







PostPosted: Tue Jul 14, 2009 3:34 am Reply with quote

yes i already now that, but thanks anyway..
Tho whole point is that the new phpbb3 system uses an advancer approach to run the sql layer , i wanted to take advantage of.
But it is ok now, i stopped this method and consider to use rss feed.
unfortunaly must wait for phpbb3 3.06 comes out in the next month , what has rss feed intregrated.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Other

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©