Re : modifier le contenu des champs de la table a partir d'un formulaire
voici le code que j'ai mis :
$this->execPieceByName('ff_initLib'); //Load the library
$myformvalue=ff_getSubmit('id'); //Load the form value
echo ff_getSubmit('quantite');
echo '<br>';
echo $myformvalue;
echo '<br>';
// start sql queries
$db = JFactory::getDBO();
$db->setQuery("Select quantite From dqetm_joomla Where id='.$myformvalue.' ");
$db->execute();
$result= $db->loadResult();
$db->execute();
echo $result;
$s =ff_getSubmit('quantite')+$result;
echo $s ;
jexit(); //stop joomla
if($result != 0){
//update
$db->setQuery("UPDATE dqetm_joomla SET quantite = $s Where id='.$myformvalue.' ");
$db->execute();
echo ('Your data have been updated correctly');
}
.
et le resultat c 'est
voici le code que j'ai mis :
$this->execPieceByName('ff_initLib'); //Load the library
$myformvalue=ff_getSubmit('id'); //Load the form value
echo ff_getSubmit('quantite');
echo '<br>';
echo $myformvalue;
echo '<br>';
// start sql queries
$db = JFactory::getDBO();
$db->setQuery("Select quantite From dqetm_joomla Where id='.$myformvalue.' ");
$db->execute();
$result= $db->loadResult();
$db->execute();
echo $result;
$s =ff_getSubmit('quantite')+$result;
echo $s ;
jexit(); //stop joomla
if($result != 0){
//update
$db->setQuery("UPDATE dqetm_joomla SET quantite = $s Where id='.$myformvalue.' ");
$db->execute();
echo ('Your data have been updated correctly');
}
.
et le resultat c 'est
Commentaire