If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > PhpMySQL Replace Value?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-01-04, 12:52
smartcard smartcard is offline
Registered User
 
Join Date: Jan 2004
Posts: 23
PhpMySQL Replace Value?

What is the command to replace value of all the field record in a table using phpmysql?

Example:
I have a table called country, and there is a filed country name. Currently I have about 50 records that have various countries, I need to replace all the records country = USA

Tks
Reply With Quote
  #2 (permalink)  
Old 11-01-04, 13:28
oliflorence oliflorence is offline
Registered User
 
Join Date: Aug 2004
Posts: 96
Use the SQL option in PHPMyADMIN:

UPDATE tblcountries SET countryField = 'USA'

This will replace all values in your field, you can also add a where close if required
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

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