Well I thank the noodly appendage that I've never used SQLite2 or 3.
Out of curiosity though, why can't you just use serialize() and unserialize() yourself. SQLite is a SINGLE USER database isn't it?
If it is a single user database, you could simply write the data ($variable) to some persistent storage, "hard drive", and recall it in an identical data structure you started with at the start of your sqlite2 DML dance? It would save you a bunch of trouble and remedy your SQL errors.
note: use file write locks when you write it.
note again: if using linux, consider leveraging the tree structure of the file system (files/directories) and symbolic links to mimic the FKs in a relational database.
its this easy anon,
$x = array('foo','bar','baz',new ArrayObject(array('mustard')));
// this is like insert into
// this is like select from
$y = unserialize(file_get_contents("example"));
All I can see sqlite3 winning at is aggregating data... everything else appears to be an additional hassle to me: which involves lots of query pecking and iterating to undo said joins.