Home » Php » PHP mysql update query not working in 2 tables

PHP mysql update query not working in 2 tables

Posted by: admin June 30, 2018 Leave a comment

Questions:

i have problem in php mysql update query it didnt work my coding is correct but still it cant work i need to know why it didnt work plz anyone help me my code is below

$sql = "UPDATE tbl_stats
        SET
        stat_account = '$account',
        stat_date = '$date',
        stat_broker = '$broker',`
        stat_profit = '$profit',
        stat_balance = '$balance'
        WHERE
        user_id = '$id'";

$query = mysqli_query($connect, $sql);

$sql2 = "UPDATE tbl_broker
        SET
        bro_name = '$name',
        bro_account = '$account2',
        bro_password = '$password',
        bro_server = '$server',
        WHERE
        user_id = '$id'";

$query2 = mysqli_query($connect, $sql2);
Answers: