English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hi,

I need a query that INSERTS the word 'yes' into the field 'taken' WHERE name = $currentname

what is the correct syntax?

Thanks!

2007-08-13 02:32:58 · 6 answers · asked by jeff lemon 1 in Computers & Internet Programming & Design

6 answers

UPDATE YourTable SET taken='yes' WHERE name='$currentname'; // YourTable is the table name

2007-08-13 02:37:34 · answer #1 · answered by Big D 4 · 0 0

the only element i'm going to propose is attempt removing one field at a time from the insert reality, and notice at what element it starts working. Then that field is your concern. it particularly is complicated paintings extensive, even even in spite of the shown fact that it particularly is the only thank you to pass.

2016-12-15 13:40:32 · answer #2 · answered by trickey 4 · 0 0

Since the record in question exists, you need to do an update statement rather than an insert.

UPDATE table_name
SET field_name = "Yes"
WHERE name = $currentname

2007-08-13 02:38:21 · answer #3 · answered by Anonymous · 0 0

I keep seeing more elementary questions from you...
You do not seem to take in consideration what users tell you.
And you really need to learn "seriously" about MySQL: your querries are those of real beginner.
Learn first.

2007-08-13 07:14:14 · answer #4 · answered by just "JR" 7 · 0 0

i think .. it's update command because there is where
here is the command :
update ttable set taken values 'yes' where name=$currentname;

by
http://www.gunungpring.com

2007-08-13 02:44:34 · answer #5 · answered by gunungpring 3 · 0 1

i think u need the update command and not insert

UPDATE table_name //change TABLE NAME !!!
SET taken = yes
WHERE name = $currentname

2007-08-13 02:38:24 · answer #6 · answered by MoooMoo 2 · 0 1

fedest.com, questions and answers