bind_param inserting zero number instead of string

Asked

Viewed 25 times

-2

Instead of inserting the string, query inserts in the Description column the zero number:

Code:

$query = $db->prepare("UPDATE table_name SET tracker = ?, description = ? WHERE id = ?");
$query->bind_param("sis", $tracker, $description, $id);
$query->execute();

1 answer

-1


The problem was in bind_param.

instead of

$query->bind_param("sss"... That is, and strings

was:

$query->bind_param("sis".... ie, String, integer, string

Browser other questions tagged

You are not signed in. Login or sign up in order to post.