Attempting to create a function to type less code for mssql_bind I wish to use this 2d array:
Array
(
[0] => Array
(
[0] => SIZECODENO
[1] => SQLVARCHAR
)
[1] => Array
(
[0] => SIZECODE
[1] => SQLVARCHAR
)
[..] => Array
(
.....
)
)
By using a for loop like so:
for($x=0;$x<count($array);$x++) {
mssql_bind ($sp,"@".$array[$x][0],$_GET[$array[$x][0]], $array[$x][1]);
}
which returns unsupported type error on all of the mssql_bind commands run by the for loop.
while if I would replace $array[$x][1] to SQLVARCHAR it accepts it right away