/* The variables being bound to by MySQLi
don't need to exist prior to binding */
mysqli_bind_param($statement, "idbs",
$myinteger, $mydouble, $myblob, $myvarchar);
/* ???????????? */
/* execute the query, using the variables as defined. */
Assuming this snippet is a smaller part of a correctly written script, what actions must occur in place of the ????? in the above code snippet to insert a row with the following values: 10, 20.2, foo, string ?
The available options are:
1. A transaction must be begun and the variables must be assigned
2. Each value must be assigned prior to calling mysqli_bind_param(), and thus nothing should be done
3. Use mysqli_bind_value() to assign each of the values
4. Assign $myinteger, $mydouble, $myblob, $myvarchar the proper values
Bookmarks