0

I'm trying to increase the value in the table by one but I don't really know mysql and I don't know whats wrong. It seems to go through no problem but when I check the database the number hasn't changed. Ive changed it a bit to follow what was said about the quotes but to no joy. Thanks in advance! :)

        $con = mysqli_connect($db_host, $db_user, $db_pass, $db_name);

    if (mysqli_connect_errno()) {
        echo "Failed to connect to MySQL: " . mysqli_connect_error();
    } else {
        echo "it works!";
    }

    switch ($_POST['found']) {
        case "facebook":
            mysqli_query($con,"UPDATE `found` SET `number` = '1' WHERE `id` = 'Facebook'");


            break;
james
  • 101
  • 1
  • 8
  • You're enclosing column names with `'` rather than `\`` which probably isn't helping – CD001 Mar 31 '16 at 15:58
  • thanks! I did that and it seems to go through no problem but the number doesn't change (at 0) – james Mar 31 '16 at 16:53

0 Answers0