toSql(); } if ( $s instanceof Blob ) { $s = $s->fetch(); } if ( $s === null ) { return 'NULL'; } elseif ( is_bool( $s ) ) { return (string)(int)$s; } elseif ( is_int( $s ) ) { return (string)$s; } else { return "'" . str_replace( "'", "\'", $s ) . "'"; } } }