|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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. |
|
#2
|
||||
|
||||
|
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
__________________
My blog about OpenSource Databases PDF tutorials about OSS databases, DBMonster ... Please contribute to Open Source Development, fill bug reports!!! Developer Shed eSupport Commented my.ini/my.cnf (PLEASE ADD YOUR OWN CONFIG TRICK) Understanding SQL Joins An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries |
|
#3
|
|||
|
|||
|
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.
|
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > Query help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|