MSSQL field with slash character

QuestionsMSSQL field with slash character
Mike Sheppard asked 9 years ago

I have a field that returns a file-path from MSSQL Database.

The grid is dropping the slash characters and not displaying correctly.

I would also like to include this field as a link – but it's being URL encoded, even though I have turned-off (disabled) URLENCODE in jqgrid_dist.php.

Any suggestions?

I have looked-over the support forum for the past 20-minutes and can't find anything other than the URLencode.

Thanks

Mike

2 Answers
Abu Ghufran answered 9 years ago

You can try editing jqgrid_dist.php and comment: line 2830

foreach($row as $k=>$r)
$row[$k] = stripslashes($row[$k]);

This may work for your case.

JJJeroenski replied 7 years ago

Hi Abu,

how could i change above code to only skip the stripslashes if “column” “Folders” ?
So only for one column instead of comment always.

Mike Sheppard answered 9 years ago

Thanks for the reply and the suggestion – I'm going to test that now.

I came-up with a work-around that sort-of works – as I noticed it was only stripping single slashes.

For MSSQL at least – you can use the replace() function. I used 3 slashes which seems to produce the correct results for me.

replace(DATA_FIELD, '', '\')

Thanks again for the continued support.

Mike

Your Answer

8 + 16 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?