Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New Coder
    Join Date
    Jan 2011
    Posts
    85
    Thanks
    1
    Thanked 2 Times in 2 Posts

    PHP mySQL data select

    Hi, I have an odd situation. I have table "locked". Here is my data.

    Code:
    +--------+----------+
    |username| locked   |
    +--------+----------+
    | admin  | yes      |
    | guest  | no       |
    +--------+----------+
    I want to select it and insert it on page load. So the next person who loads page, I want it to do this.

    Code:
    +--------+----------+
    |username| locked   |
    +--------+----------+
    | admin  | yes      |
    | guest  | no       |
    | test   | no       |
    +--------+----------+
    But if I'm using admin. I don't want a duplicate row. Instead I want it to just be selected or print nothing.

    Is there a possible way for this?


    EDIT: Never mind. I fixed it.
    Last edited by xiong_ster123; 02-25-2013 at 01:00 PM. Reason: Resolved


 

Posting Permissions

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