Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Aug 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.

  • #2
    Regular Coder
    Join Date
    Oct 2003
    Posts
    603
    Thanks
    2
    Thanked 1 Time in 1 Post
    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

  • #3
    New to the CF scene
    Join Date
    Aug 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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:


    $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.

  • #4
    New to the CF scene
    Join Date
    Aug 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help!!!!!

    I could really use help - can someone help me please??

  • #5
    $object->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Jun 2003
    Posts
    3,093
    Thanks
    2
    Thanked 23 Times in 23 Posts
    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!

  • #6
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •