Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-25-2013, 09:02 AM   PM User | #1
xiong_ster123
New Coder

 
Join Date: Jan 2011
Posts: 37
Thanks: 1
Thanked 0 Times in 0 Posts
xiong_ster123 is an unknown quantity at this point
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 12:00 PM.. Reason: Resolved
xiong_ster123 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:26 AM.


Advertisement
Log in to turn off these ads.