[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sqlite-users
Subject:    Re: [sqlite] writing results to file in php
From:       "Clay Dowling" <clay () lazarusid ! com>
Date:       2004-12-29 15:50:52
Message-ID: 3564.12.37.120.99.1104335452.squirrel () mail ! lazarusid ! com
[Download RAW message or body]


D.W. said:
> I want to write results of a query in an ascii file.
>
> In the shell this works:
> sqlite> .mode list
> sqlite> .separator |
> sqlite> .output test_file_1.txt
> sqlite> select * from tbl1;
> sqlite> .exit
>
> I tried similar querys in php, but without any success.
> It seems that Sqlite in php doesn't know the output command. How is the
> synthax in php? Can anybody help me?
> Daniel

The normally accepted procedure in most languages is to retrieve your
result set from "select * from tbl1", then write that result set to a file
using the facilities of the programming language.  The approach you're
trying is to use the features of the sqlite shell rather than the features
of the sqlite database.  PHP doesn't give you access to the shell, only
the database.

Clay Dowling
-- 
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic