MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old May 3rd, 2008, 12:06 PM
ennyJ ennyJ is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 2 ennyJ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 46 sec
Reputation Power: 0
Query help

Hello. I've searched long and fruitlessly for a solution to something that I'm sure is incredibly simple. I don't even know how to explain my problem, except to show you this screenshot I took within my phpmyadmin: well, okay, I'm blocked from inserting the link or embedding the image in my post, so you'll have to remove the spaces: meetporthuron .com/new/images/phpmyadmin .jpg

I simply want to change the value (if that's the correct thing to call it) of "Single and Looking" to "Single and Mingling". Seems the only way to do it must be by writing a query, and I, obviously, don't know much about writing queries.

Reply With Quote
  #2  
Old May 3rd, 2008, 12:15 PM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,395 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 4 h 48 m 59 sec
Reputation Power: 255
Hi and welcome to Devshed, in the future you might want to:

1.use a descriptive subject for your posts, in this case mention you want to update one or more rows

2. post your query in [ code ] tags, like this

Code:
select count(*) as `rows`, user_relationstatus
from phpbb_users
grup by user_relationstatus
order by user_relationstatus
limit 0,30


3. post your results and describe what you want to get.

You have a row that looks like
127, 'Single and Looking'

and want to update your table to get

127, 'Single and Mingling'


So you need an update query, something like

sql Code:
Original - sql Code
  1. UPDATE
  2.  phpbb_users
  3. SET
  4.  user_relationstatus = 'Single and Mingling'
  5. WHERE
  6.  user_relationstatus = 'Single and Looking';

Reply With Quote
  #3  
Old May 3rd, 2008, 12:32 PM
ennyJ ennyJ is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 2 ennyJ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 46 sec
Reputation Power: 0
Hi pabloj. Thanks for the welcome and advice. I would usually be more descriptive with a subject but, as mentioned, I don't even know the terminology to describe my problem. The query shown in the image isn't something I entered myself, I simply went into my phpbb_users table, then in the row user_relationstatus, I clicked the "Browse distinct values" icon, and that's where it landed me. I'm not too educated in the whole realm of database manipulation. Your query did the trick, THANK YOU so much for your help.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Query help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway