quelqu'un peut-il m'aider avec mon format de requête. ma sortie est:php/mysql Si ternaire
UPDATE TABLE
SET Notes = 'testyyy',
0
WHERE Id = '1'
... quand il devrait être:
UPDATE TABLE
SET Notes = 'testyyy ,
Notify = '0'
WHERE Id = '1'
PHP:
if(!isset($_POST['main'])) {
$up = "UPDATE TABLE SET Notes = '".$_POST["field"]."' ",";
$up .= " Notify = '".($data["Notes"] == '') ? '0' : '1'."'";
$up .= " WHERE Id = '".$_POST["id"]."'";
echo $up;
mysql_query ($up);
grâce, qui a résolu le problème – acctman