Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function selectQuery($query,$user_input=array()){
- $s='';
- if(count($user_input)>0){
- foreach( $user_input as $input ){
- $s.='s';
- }
- }
- $select=$this->mysqli->prepare($query);
- $select->bind_param($s,$user_input); //this is the line where the array is going in and apparently is not possible.
- $select->execute();
- }
- $query='SELECT * FROM users where username=?';
- $user_input=array('test');
- $test->selectQuery($query,$user_input);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement