NYCPHP Meetup

NYPHP.org

[nycphp-talk] sqlite utility and reloading a dump

John Lacey jlacey at att.net
Sat Dec 6 16:37:43 EST 2003


Hello all,

I understand there are a couple people working on PHP5 on 
the list, so I'll begin here.

In the process of converting a PHP application that uses 
MySQL to use SQLite, I naturally started with converting the 
schema into something that SQLite understood, e.g. INTEGER 
PRIMARY KEY for auto_increment and so forth.  The file I am 
working with was created by phpMyAdmin which of course 
escapes single quotes within single-quoted strings with \'

In firing up the sqlite.exe utility on a W2KPro box, I was 
getting "unrecognized token" errors.  SQLite lets you read 
in a file with the command ".read FILENAME", once sqlite is 
invoked.  I traced the error detection to the tokenizer.c 
file where an illegal token flag was being set when checking 
the \' sequence with a case statement of case '\'':

I then went and downloaded sqlite version 2.8.7 -- just 
releases -- same indication.

After going back and forth several times with SQLite's 
author, D. Richard Hipp, who was very responsive, he allowed 
that I could submit an enhancement to have a PRAGMA which 
turn on backslash escapes.

My question is: hasn't this behavior come up before in light 
of the fact that SQLite is being included in PHP5?

thanks,
John







More information about the talk mailing list