...

View Full Version : PHP / MYSQL Coding Questions



vgamenews
08-01-2006, 09:33 PM
Here's the situation:

I have obtained a CMS that I am trying to install into about 8 different subdomains, but the prefixes for the database is already programmed directly into the CMS, and then you install the schema.

What I would like to do, is to have each subdomain a different prefix. How do I do this so that all I have to do is type in the prefix once and it will then proceed to the rest of the CMS and I dont have to go through the program eight different times and only once.


Hope this makes sense, as for PHP/MySql Im a novice programmer, but learning quickly.


Thanks for any help you can provide.

boeing747fp
08-01-2006, 10:11 PM
you would have to modify the install code to have an input field for "prefix" and go through the install code and replace the current prefix constant with the variable

vgamenews
08-02-2006, 12:37 AM
you would have to modify the install code to have an input field for "prefix" and go through the install code and replace the current prefix constant with the variable

Thats the problem it isnt in just the install code - its throughout the whole program.

So here's what Im thinking, but Im pretty much a novice at programming. I can read the code and understand what it is suppose to do but programming is a whole other matter.

Okay here it goes:




$prefix = 'prefix_';
save this as say prefix.php

then go through change all the prefix now to $prefix and add include prefix.php to all files I have changed.

Will this work or is there more too it and Im way off base.

vgamenews
08-03-2006, 04:37 AM
I could really use help - can someone help me please??

vinyl-junkie
08-03-2006, 05:24 AM
Will this work or is there more too it and Im way off base.
Without knowing what CMS you are using and seeing the code, my guess is that there is way more to it, and that you would most likely have to make extensive changes to it to get it to work.

raf
08-03-2006, 07:36 AM
I could really use help - can someone help me please??
i'd recommend you to choose another cms.
if they made very basic mistakes like not isolating their connection and db-selection string in a seperate include or config-file, so that you can easely change the schema and so that you could use multiple schema's for different usergroups, then they probably didn't do a good job on the rest of their code.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum