Код: Выделить всё
$stm = mysqli_stmt_init($conn);
$num = 123456;
if(!mysqli_stmt_prepare($stm,"insert into test.abc (a_column) values (?) "))
exit('Prepare failed');
mysqli_stmt_bind_param($stm,"s",$num);
mysqli_stmt_execute($stm);
Подробнее здесь: https://stackoverflow.com/questions/284 ... type-works