#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2008
    Posts
    129
    Rep Power
    11

    Updating/changing a database row


    I have recently ran into some problems with the way I originally set up my database and I am now in the process of fixing these problems so that future updates of the site are much easier

    I have a mysql table which contains many faculty members. Each member is assigned to a department. ON the website itself one can click on each individual department to find the faculty members. The problem occurs when the department is more than one word because the PHP page simply uses GET to retrieve which department to display. so for example I have Counter and that works perfectly but accounts payable does not.

    So I have decided to create a table that has the departments listed by name and by ID. EXAMPLE

    counter Counter
    accountspayable Accounts Payable

    I created this table already and now I want to change the faculty table where there faculty positions is listed. So if they in Accounts Payable I want it to say accountspayable. What is the easiest way to go about changing all of these fields in the table?
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2008
    Posts
    577
    Rep Power
    181
    Just use urlencode for the GET variable and you will be fine.

    So when you are making your

    <a href='site.php?var='.urlencode('variable');
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2008
    Posts
    129
    Rep Power
    11
    Wow. I am glad I posted here first. There is always something that is there for you no matter what it is. Thanks.

IMN logo majestic logo threadwatch logo seochat tools logo