Update [closed] does not work

1

I have a table plazas with the attributes NUMPLAZA , OCUPACION , IDusuario I want to change the value of OCUPACION to OCUPADO using the following query from php:

elseif ($row['Cargo'] == "directivo2") {

        $sql = "UPDATE 'plazas' SET 'OCUPACION'='OCUPADO' WHERE  'NUMPLAZA'='3'";;}

However, the row is not being updated.

    
asked by Mariopenguin 24.05.2017 в 14:35
source

1 answer

1

Hello, you are not running the query, add line 2 to your code

1 $sql = "UPDATE 'plazas' SET 'OCUPACION'='OCUPADO' WHERE  'NUMPLAZA'='3'";
2 $resultado = mysql_query($sql);
    
answered by 24.05.2017 / 14:44
source