Jump to content

update, delete


jherbaux

Recommended Posts

Bonsoir,
Alors voila j'ai une base que j'ai créer et dans la quelle je fais quelques opération insert, et delete

Pour le insert pas de problème, j'ai fait sa:

        $result = Db::getInstance()->ExecuteS('
       SELECT *
       FROM `'._DB_PREFIX_    .'know_choice`');



par contre update sa marche pas, j'ai fais sa

Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'know_choice` SET `type`='.$_POST['enregist'].' WHERE `id_choice` = '.$_GET['choice']);    





Je sais pas si vous voyez une erreur.

Merci

Link to comment
Share on other sites

  • 1 year later...

Bonjour,
c'est bien enregist ? dans POST ? pas enregistre ?
Sinon si ce ne sont pas des valeurs entières alors elles doivent entourées de ' et donc forcément échappé par \

Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'know_choice` SET `type`=\''.$_POST['enregist'].'\' WHERE `id_choice` =\''.$_GET['choice'].'\'');

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...