SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Fixed value?

  1. #1
    SitePoint Addict
    Join Date
    Apr 2002
    Posts
    395
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Fixed value?

    Is it possible to have "fixed value" if that even exists?

    What I mean by this is that there would be a value already put in and anything else that would get put in the db would just be placed next to it.

    For example I have a members column. The fixed value is "Zteam_" and when a new member is added(for ex "Jack"), the value is overwritten and just reads "Jack".

    What I want is that when a new member called "Jack" is added to the db, it will actually read "Zteam_Jack" in the members row.

    P.S. The addition to the db takes place through a form + php.

  2. #2
    Non-Member
    Join Date
    Jun 2001
    Location
    Rome,GA
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It could be done using triggers, but MySQL doesnt have them, so I guess there is only one way: before adding a member's name in to the database, create a constant "Zteam_" and add it to the name.


Bookmarks

Posting Permissions

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