Author |
Message |
wHiTeHaT
Life Cycles Becoming CPU Cycles

Joined: Jul 18, 2004
Posts: 579
|
Posted:
Mon Jul 13, 2009 7:02 am |
|
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. |
|
|
|
 |
evaders99
Former Moderator in Good Standing

Joined: Apr 30, 2004
Posts: 3221
|
Posted:
Mon Jul 13, 2009 6:48 pm |
|
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! |
|
|
 |
wHiTeHaT

|
Posted:
Tue Jul 14, 2009 12:06 am |
|
Forget my question.. what i try to do is not posseble.
php doesnt allow to exclude/unload an included file |
|
|
|
 |
floppydrivez
Involved


Joined: Feb 26, 2006
Posts: 340
Location: Jackson, Mississippi
|
Posted:
Tue Jul 14, 2009 3:16 am |
|
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! |
|
|
 |
wHiTeHaT

|
Posted:
Tue Jul 14, 2009 3:25 am |
|
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

|
Posted:
Tue Jul 14, 2009 3:27 am |
|
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

|
Posted:
Tue Jul 14, 2009 3:34 am |
|
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. |
|
|
|
 |
|