how can I hide a news entry ?

Discussion in 'PHP' started by dominik, May 7, 2006.

  1. #1
    I am working on an CMS, and now I am creating a newsscript, it schould delete news entries , edit and hide news entries!
    can somebody tell me how can I hide news entries!
    the news entry should not be deleted from the database but the users schould not be able to see it on the webside page!
    that means me as administrator , if I click on hide, this entry schould not be shown any more?
    does somebody know which mysql command can do this ?
    thanks
    johni
     
    dominik, May 7, 2006 IP
  2. JRJR

    JRJR Active Member

    Messages:
    172
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #2
    Why don't you create a new column in the database to specify if the news is to be shown or not?
     
    JRJR, May 7, 2006 IP
  3. dominik

    dominik Guest

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks for your reply
    how can I manage this, it can be managed with enum ?
    could you tell me please how can I do it ?
    I am an amateur in php !
    thanks
    johni
     
    dominik, May 7, 2006 IP
  4. JRJR

    JRJR Active Member

    Messages:
    172
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #4
    You can do this many ways.
    - enum column type like you said
    - a tinyint(1) column (1->true; 0->false)
    - a varchar(5) with values such as true or false.
    - ...
     
    JRJR, May 7, 2006 IP