Hi everyone,

I found the SQLite DLL for PHP today and just wanted to do some testing
with it. I could rewrite my dump of the MySQL tables and data so that
SQLite would understand it. But there's a fundamental problem left. I
have strings that contain ' characters. But strings are written in ''
characters theirselves. MySQL would want a 'Rock\'n\'Roll' here, so '
get backlash-escaped. But there seems to be a problem with it. I get no
detailled error description, but when I remove all \' it works. Here's
my SQL and result:

---SQL
INSERT INTO tasks VALUES (1, 1, 1091182902, 'Access rules are not
applied to forums\' categories', 'ACL system:\nRules are only applied to
the specified and subsidiary forums. Guests may not be able to see an
actually accessible forum inside a category which they have no view
rights for.\n-> Extend forum rights to directly superior categories in a
way that doesn\'t open all other forums', 'ACL apply', 5, 1, 1,
1091225287, 4, 1, 2, 0, 0, 0, 1, '1.5-dev-20040729', '1.6', 0, 0, '');
---

---PHP code
sqlite_query($db, join(file('bugs.sql')));
---

---PHP output
Warning: sqlite_query(): unrecognized token: ":" in
C:\wwwroot\projects\bugtracker\sql.php on line 4
---

It means the : behind the \' I guess. Removing all \' helps to execute
the query.

So how can I insert ' characters into a table other than by \'?

PS: Subscription to this list has not replied my anything within an
hour, I home I'll get replies to this post. Please CC me to be sure. TIA

--
Yves Goergen <[EMAIL PROTECTED]>

BlackBoard Internet Newsboard System --> blackboard.unclassified.de
Free (GPL), easy to use and install, secure, innovative! (PHP+MySQL)



Reply via email to