SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    170
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP if Statement

    In the database, I have a column labeled usergroup. In my PHP page, I want to display users with ONLY 4 usergroups (based on the number that is in the database for that user.)

    My question is - and I am drawing a blank - how do you define the variable to use in the if statement?

  2. #2
    SitePoint Enthusiast scout1idf's Avatar
    Join Date
    Nov 2009
    Location
    Ohio
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is this what you are looking for.....

    PHP Code:
    SELECT FROM table WHERE usergroup 

  3. #3
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,882
    Mentioned
    74 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by boboreo View Post
    In the database, I have a column labeled usergroup. In my PHP page, I want to display users with ONLY 4 usergroups (based on the number that is in the database for that user.)

    My question is - and I am drawing a blank - how do you define the variable to use in the if statement?
    Please supply the code that you have tried, it is better to learn from your mistakes

    Please also note:

    >>> In the database, I have a column labeled usergroup.
    Columns can only exist in database tables.
    Last edited by John_Betong; Aug 18, 2012 at 20:01. Reason: added note about table columns
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Wolfshade on earning Member of the Month for August 2014


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
  •