1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

php SQL statement to print

Discussion in 'PHP' started by wilburforce, Oct 16, 2006.

  1. #1
    If i want to print a message

    "Has Private Pictures"
    if a member has private images from a SQL table row "catid"

    do i do it in php or SQL?
    I have no idea how to do it

    0 = public
    1 = private
     
    wilburforce, Oct 16, 2006 IP
  2. ketan9

    ketan9 Active Member

    Messages:
    548
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #2
    In short, you need to do it in both PHP and SQL. You need to save '0' or '1' value in MySQL table and during the query check if it is 0 or 1 and show the message or picture accordingly.
     
    ketan9, Oct 16, 2006 IP
  3. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,617
    Likes Received:
    101
    Best Answers:
    0
    Trophy Points:
    105
    #3
    First I would check the value:

    Peace,
     
    Barti1987, Oct 16, 2006 IP