MySQLi INSERT(准备好的语句)不起作用

I've looked through similar questions on here and so have fixed problems like with backticks, but for some reason my code still isn't working, and I'm not getting anything inserted into the table at all. I'd really appreciate a pair of fresh eyes over it to see what's going wrong - it's probably something annoyingly tiny...

// Connect
$con = new mysqli( $db_server, $db_user, $db_pass, $db_name );

// Check connection
if($con->connect_error) {
    die("Connection failed: " . $con->connect_error);
}

$user = $_POST['name'];
$pass = password_hash($_POST['pass'], PASSWORD_BCRYPT);

$sql = "INSERT INTO `users` (`user`, `pass`) VALUES(?, ?)";

$query = $con->prepare( $sql );
$query->bind_param("ss", $user, $pass);

$res = $query->execute();

if (!$res) {
    printf("Errormessage: %s
", $con->error);
}

The database itself has a table, "users", which has three columns - uid (autoincrementing unique ID), user and pass.

EDIT: Added error reporting on the execution, and it's giving me the following error statement: "You have an error in your SQL syntax; check the manual that corresponds to your server version for the right syntax to use near '?, ?)' at line 1"

EDIT 2: Updated code.

EDIT 3: Somehow, it's fixed itself. Hm.