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

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 08-01-2006, 09:33 PM   PM User | #1
vgamenews
New to the CF scene

 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
vgamenews is an unknown quantity at this point
PHP / MYSQL Coding Questions

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.
vgamenews is offline   Reply With Quote
Old 08-01-2006, 10:11 PM   PM User | #2
boeing747fp
Regular Coder

 
Join Date: Oct 2003
Posts: 599
Thanks: 1
Thanked 1 Time in 1 Post
boeing747fp is an unknown quantity at this point
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
boeing747fp is offline   Reply With Quote
Old 08-02-2006, 12:37 AM   PM User | #3
vgamenews
New to the CF scene

 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
vgamenews is an unknown quantity at this point
Quote:
Originally Posted by boeing747fp
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:


Quote:
$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 is offline   Reply With Quote
Old 08-03-2006, 04:37 AM   PM User | #4
vgamenews
New to the CF scene

 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
vgamenews is an unknown quantity at this point
Help!!!!!

I could really use help - can someone help me please??
vgamenews is offline   Reply With Quote
Old 08-03-2006, 05:24 AM   PM User | #5
vinyl-junkie
$object->toCD-R(LP);


 
vinyl-junkie's Avatar
 
Join Date: Jun 2003
Posts: 3,053
Thanks: 2
Thanked 22 Times in 22 Posts
vinyl-junkie is on a distinguished road
Quote:
Originally Posted by vgamenews
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.
__________________
Music Around The World - Collecting tips, trade
and want lists, album reviews, & more
SNAP to it!
vinyl-junkie is offline   Reply With Quote
Old 08-03-2006, 07:36 AM   PM User | #6
raf
Master Coder


 
Join Date: Jul 2002
Posts: 6,589
Thanks: 0
Thanked 0 Times in 0 Posts
raf will become famous soon enoughraf will become famous soon enough
Quote:
Originally Posted by vgamenews
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.
__________________
Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html
raf 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 07:58 PM.


Advertisement
Log in to turn off these ads.