CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 mysql database query (update)

Print topic Send  topic

Author Message
yana

Posts: 11
Posted: 07/23/2007, 11:47 PM

helo...

I have a table with about 2000 data.
I would like to update all the data.

original data:
salma
james
chua
marry

I want to update all the data by adding '/1' at the end of every data. example:
salma/1
james/1
chua/1
marry/1

the idea is using the 'update' syntax but I don't clearly know how to do it. Is anyone out there can help me?
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 07/24/2007, 4:01 PM

yana

Here is a query that you can use:
update TableNameHere set FieldName=concat(FieldName,"/1")

TableNameHere - Whatever the table name is
FieldName - Whatever the name of the field is that you want to add /1 to.

NOTE: If you are new to MySQL I would suggest downloading thier CHM for MySQL it is a good reference to have for occassions like this.
View profile  Send private message
yana

Posts: 11
Posted: 07/24/2007, 9:22 PM

mamboBROWN

thanx a lot!!! the query run successfully. thanks for your help and advice :-)
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 07/25/2007, 8:44 PM

yana
No problem. Glad I could be of assistance.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.