Current location: Hot Scripts Forums » Programming Languages » PHP » How do I delete usernames or values from fields in databases?


How do I delete usernames or values from fields in databases?

Reply
  #1 (permalink)  
Old 12-03-09, 06:51 PM
Proof99 Proof99 is offline
Newbie Coder
 
Join Date: Dec 2009
Posts: 6
Thanks: 2
Thanked 0 Times in 0 Posts
Question How do I delete usernames or values from fields in databases?

How do I delete user names or values from fields in databases? For instance:

In database: Names

Table: Fred

Field: username

How would I delete a or user name specific value from the field username?
Attached Images
File Type: gif username field.gif (4.7 KB, 141 views)
Reply With Quote
  #2 (permalink)  
Old 12-03-09, 08:36 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by Proof99 View Post
How would I delete a or user name specific value from the field
username?
In phpMyAdmin, if the name to be deleted was, for example, "OneMoreTime", you'd go to the "SQL" tab and type:

DELETE FROM Fred WHERE username = 'OneMoreTime' LIMIT 1

Then you'd click the 'Go' button.

Note that by default, mySQL doesn't operate in a case-sensitive manner, so if you had the names "OneMoreTime", "ONEMORETIME", and "onemoretime" in the table, whichever one was found first would be the one that was removed. Without the "LIMIT 1" clause they would all be removed.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]

Last edited by End User; 12-03-09 at 08:38 PM.
Reply With Quote
The Following User Says Thank You to End User For This Useful Post:
Proof99 (12-04-09)
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Auto Dealer Script nuzzle PHP 17 04-14-10 08:34 PM
Storing values on custom fields (cms) phpdoctor PHP 1 09-15-09 08:11 PM
[SOLVED] Friend to Friend Shortest Path sandeep.kumar Database 51 01-15-09 03:12 AM
hidden fields not passsing values! aleksgurl Perl 1 11-07-03 12:20 AM


All times are GMT -5. The time now is 08:05 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.