I have a generic function of php to insert data into mysql.
public static function query($sql) {
self::CONNECT ();
$numargs = func_num_args ();
$arg_list = func_get_args ();
//start from 1st parameter as 0th parameter is the query
for($i = 1; $i < $numargs; $i ++) {
//echo $arg_list[$i]." - ";
if (is_int ( $arg_list [$i] )) {
$query->bindParam ( $i, $arg_list [$i], PDO::PARAM_INT );
} else {
$query->bindParam ( $i, $arg_list [$i], PDO::PARAM_STR );
}
}
$query->execute ();
return $query;
}
Here I was wondering how can I check if the given argument is a for a BLOB
data type? So that I can give it PDO::PARAM_LOB
while calling bindParam