PHP-Sqlite, missing information when data in the database contain forward slash

SiemensSEN
SiemensSEN used Ask the Experts™
on
Hello,
  I have a sqlite database that has the following data

DATE | CID|Duration
2012-03-15 14:55:37.509 | /</>+@<`|10
2012-03-15 14:55:47.029 |b8899d01cb5062e6 |25

However, when the information is displayed on a page some of the special characters are truncated

DISPLAY
2012-03-15 14:55:37.509       /+@<`      10      '' missing /< >
2012-03-15 14:55:47.029       b8899d01cb5062e6       25
SQL statement
$sql = select  date ,cid,duration from mytable
$retV = $this->myConn->fetchAll($sql);

If I run the command from the SQL console it is retrieve correctly
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2011
Top Expert 2016
Commented:
Use "view source" to look at the data.  It is possible that the strings are whole, but the browser has interpreted part of the strings as HTML tags.  This happens a lot to people who try to echo XML to the browser.

The correct way to write this sort of thing in a human-readable format is to use htmlentities() before echoing the data.
http://php.net/manual/en/function.htmlentities.php
Commented:
Have you tried
sqlite_escape_string
its documented at http://php.net/manual/en/function.sqlite-escape-string.php
and should address your problem.

Author

Commented:
I used the combination of htmlentities and urlencode to address my issue.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial