public function bind($param, $value, $type = null)
    {
        if (is_null($type)) {
            switch (true) {
                case is_int($value):
                    $type = PDO::PARAM_INT;
                    break;
                case is_bool($value):
                    $type = PDO::PARAM_BOOL;
                    break;
                case is_null($value):
                    $type = PDO::PARAM_NULL;
                    break;
                default:
                    $type = PDO::PARAM_STR;
            }
        }
        //then run PDO bindValue on the statement to bind the values
        self::$statement->bindValue($param, $value, $type);
    }
public function bind($param, $value, $type = null)
    {
        if (is_null($type)) {
            switch (true) {
                case is_int($value):
                    $type = PDO::PARAM_INT;
                    break;
                case is_bool($value):
                    $type = PDO::PARAM_BOOL;
                    break;
                case is_null($value):
                    $type = PDO::PARAM_NULL;
                    break;
                default:
                    $type = PDO::PARAM_STR;
            }
        }
        //then run PDO bindValue on the statement to bind the values
        self::$statement->bindValue($param, $value, $type);
    }
public function bind ( $ param , $ value , $ type = null ) { if ( is_null ( $ type ) ) { switch ( true ) { case is_int ( $ value ) : $ type = PDO :: PARAM_INT ; break ; case is_bool ( $ value ) : $ type = PDO :: PARAM_BOOL ; break ; case is_null ( $ value ) : $ type = PDO :: PARAM_NULL ; break ; default : $ type = PDO :: PARAM_STR ; } } //then run PDO bindValue on the statement to bind the values self :: $ statement -> bindValue ( $ param , $ value , $ type ) ; }
bind the inputs with the placeholders we put in place
@param  string $param placeholdder name eg :name
@param  $value actual value that we want to bind to the placeholder e.g. Prosper
@param  sttring $type is the datatype of the parameter, example string.
bind the inputs with the placeholders we put in place