|
Joined: Nov 2001
Posts: 745
Admin Emeritus
|
Admin Emeritus
Joined: Nov 2001
Posts: 745 |
Here's an odd one:
I want to have page data for some pages stored in a MySQL table. The only problem is some of the pgaes contain some PHP bits in them. Am I trying to do the impossible or is this something possible.
Or is this something I should be accomplishing by calling a function in classes. If that is the case, how would I take a query string to call a function dynamically.
For example, if my query string was ?fetch=somepage then how could I call a function in the class fetch called somepage?
|
|
|
|
Joined: May 1999
Posts: 3,039
Guru
|
Guru
Joined: May 1999
Posts: 3,039 |
Not exactly sure I'm following. Maybe I'm being dense, you know, the weekend and all If you can clarify a bit more , maybe some examples of what your storing and what you mean by php bits, I might be able to give some pointers
UBB.threads Developer
|
|
|
|
Joined: Nov 2001
Posts: 745
Admin Emeritus
|
Admin Emeritus
Joined: Nov 2001
Posts: 745 |
I'm talking about having Page data in a MySQL table. I attempted this early on in another project, and didn't fiddle to much with it due to time. Essentially, I have some HTML, with a section of PHP in it, and tried to stick it in a DB, then retrieve it based off of query string and do the procedure. I'm guessing I'm trying something totally insane. I was trying to rethink the way I'm assembling things totally, as my current stuff has a lot of duplicated code, and isn't very portable. Basically, I'm trying to find some alternatives to having a ton of includes. Especially for some functions of the script. Maybe I would be better off generating pages based off of functions and classes. I mentioned in my first post the possibly of calling a class based off of the query string where I have like index.php?fetch=somepage and then index.php goes and finds Fetch::somepage and displays it. If I was to attempt this, how would I call Fetch::somepage without having a case block, or if/then blocks hard coded. If I go this route, I'd like to be able to just add a class and/or function, and the script is able to recognize it.
Last edited by Ron M; 03/13/2004 5:33 PM.
|
|
|
|
Joined: Nov 2001
Posts: 745
Admin Emeritus
|
Admin Emeritus
Joined: Nov 2001
Posts: 745 |
Ok, after research on the internet, and about an hour of changing, uploading, and testing, I figured out how to dynamically call functions inside classes.
I think that will work better to streamline things.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 1,157
Joined: July 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|