Hello,
I have a database table "table_name" with colomn "ID" (not the primary key).
I want to change the value for each field that has value "A" into value "B".
I thought I could achieve this with PHP statement
"update table_name set ID='B' WHERE ID='A'
but that does not work.
Can anyone help ?
Thanks in advance !
select records based on field content and replace that conte
Moderator: General Moderators
Re: select records based on field content and replace that c
please post the complete code that you are using....
you are missing a " at the end (if this is the complete sentence that you wrote in your PHP code
you are missing a " at the end (if this is the complete sentence that you wrote in your PHP code
dirkriemp wrote: "update table_name set ID='B' WHERE ID='A'
Re: select records based on field content and replace that c
Thanks for you reply.
I allready fixed it, one of the variables was empty, so no help is needed anymore.
$query = "update table set ID='$_POST[Value_B]' WHERE ID='$_POST[Value_A]'";
I allready fixed it, one of the variables was empty, so no help is needed anymore.
$query = "update table set ID='$_POST[Value_B]' WHERE ID='$_POST[Value_A]'";