Re: [sqlite] Sub-Select

2005-03-08 Thread Michael Knigge
Jakub Adamek schrieb:
Michael, it is because SQLite 3.1.3 changed (or has errors in, it is a 
matter of opinion) the column naming. Try
Thanks a lot - it works!
Bye
  Michael


Re: [sqlite] thoughts on a web-based front end to sqlite3 db?

2005-03-08 Thread morten bjoernsvik
 
> Ease of learning is a plus as I need to get
> something basic up and 
> running fairly fast. I've heard good things about
> Python in that respect.
> Does anyone have alternative suggestions, or if you
> agree that Python Is 
> Good, would you suggest using APSW, pysqlite, or
> something else?

Do not underestimate the power of the SQLite console
(aka the sqlite3 binary).

I've been using php with sqlite module compiled in and
perl with DBD::SQLite for long time. but after I wrote
a simple 55lines SQL_direct parser for the console, I
prefer using it. it gives me full access to all the
.commands and input/output blobs via tempfiles. I just
build up a file of SQLite commands and SQL queries to
be executed and just parse it through like in:
$textoutput= `$sqlite $database < $sqlcommandfile`;
Blobs are handled via files.

--
MortenB









Re: [sqlite] write invoices

2005-03-08 Thread Clay Dowling

Jan Ekström said:
> I have created a small sqlite3-database with three tables. When I have
> done
> my qeuries I want to write invoices based upon my data. In what direction
> do
> I turn. Where can I find open source free programs for this purpose.
> Windows
> Home Edition.

Where you turn depends largely on what language you want to use.  If
you're using C, I strongly recommend checking out PDFLib from Thomas
Mertz.  It's a very easy to use little library that lets you generate high
quality PDF files.  PDF files have the advantage of being useful for
printing as well as emailing.  Many businesses like the cost savings of
emailed invoices.

If you're wanting HTML output, my own libtemplate is a good choice for
generating your output (http://www.lazarusid.com/libtemplate.shtml). 
Plain text files are also nice for their portability, and printf or your
language's built in facilities for generating formatted text are strongly
to be preferred.

Clay Dowling
-- 
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development


Re: [sqlite] Sub-Select

2005-03-08 Thread Jakub Adamek
Michael, it is because SQLite 3.1.3 changed (or has errors in, it is a 
matter of opinion) the column naming. Try

>> SELECT   max(Sendung)
>> FROM
>> (SELECT  S.Sendung AS Sendung
>>  FROM Auftrag AS A,
>>   Sendung AS S
>>  WHERE(A.PosyDat = 1 AND A.PosyDat = S.PosyDat) AND
>>   (A.PosyNId = 6 AND A.PosyNId = S.PosyNId) AND
>>   (A.DateiNum = 1 AND A.DateiNum = S.DateiNum) AND
>>   (A.ReprintNum = 0 AND A.ReprintNum = S.ReprintNum) AND
>>   (S.Sendung >= 1 AND S.Sendung <= 600)
>>  LIMIT300) AS Sub;
Michael Knigge wrote:
Hi,
sorry... I forgot I get the error "no such column: Sub.Sendung" 
So I guess/hope it's only a "syntax error" with my SQL - my SQL-Skills 
are rather bad ;-(

Thanks,
  Michael

All,
could someone please tell me why this query doesn't work with 3.1.3 
(with 3.0.8 it works):

SELECT   max(Sub.Sendung)
FROM
(SELECT  S.Sendung
 FROM Auftrag AS A,
  Sendung AS S
 WHERE(A.PosyDat = 1 AND A.PosyDat = S.PosyDat) AND
  (A.PosyNId = 6 AND A.PosyNId = S.PosyNId) AND
  (A.DateiNum = 1 AND A.DateiNum = S.DateiNum) AND
  (A.ReprintNum = 0 AND A.ReprintNum = S.ReprintNum) AND
  (S.Sendung >= 1 AND S.Sendung <= 600)
 LIMIT300) AS Sub;
Thanks a lot,
  Michael


[sqlite] write invoices

2005-03-08 Thread Jan Ekström
I have created a small sqlite3-database with three tables. When I have done 
my qeuries I want to write invoices based upon my data. In what direction do 
I turn. Where can I find open source free programs for this purpose. Windows 
Home Edition.
Jan Ekström



Re: [sqlite] thoughts on a web-based front end to sqlite3 db?

2005-03-08 Thread Christopher Petrilli
On Tue, 8 Mar 2005 09:17:40 -0500 (EST), Clay Dowling
<[EMAIL PROTECTED]> wrote:

> > So, I was wondering if any of the more opinionated among you would care
> > to suggest an interface language. It'll be on a Linux box, presumably
> > running apache although I'm open to alternatives. The app itself uses
> > sqlite3 for scheduling jobs and storing job data, so the web interface
> > only needs to be able to insert some data and do visualization
> > (pretty standard stuff I think).
> 
> See this month's Linux journal for my opinions on the matter of interface
> languages.  SQLite3 is a dream to work with in a C++ CGI program,
> especially true if you make use of my web template library
> (http://www.lazarusid.com/libtemplate.shtml).
> 
> Python is probably fine as well, as long as you aren't concerned about
> performance.

Bah, this is a red herring.  I've built Python sites that handle
millions of hits a day on top of Zope, and Zope isn't that efficient. 
There's sites running SkunkWeb that handle tons of load, and we're not
talking about anything close to that here.

Algorithms are 99% of the problem, language performance is 1%.  People
often blame the language (Python, Perl, Tcl, etc) for their own
inability to understand algorithm behavior.  O(N^2) is gonna suck on
every platform, even if written in assembly when N becomes some
reasonable number.

Use what you're comfortable writing in, because that's what you'll be
productive in. If that's C++ great, but don't not use a language
because of performance concerns unless you truly have a C10K problem.

Chris
-- 
| Christopher Petrilli
| [EMAIL PROTECTED]


Re: [sqlite] thoughts on a web-based front end to sqlite3 db?

2005-03-08 Thread Derrell . Lipman
[EMAIL PROTECTED] (Eli Burke) writes:

> I've been working on a project using sqlite3 since last fall. At the time,
> I knew that it would need a web-based front-end eventually. I have a very
> small bit of experience with PHP, and I assumed that PHP would support 
> sqlite3 sooner or later. Well, it's later, and as far as I know, PHP
> is still using the 2.x branch. 

sqlite3 is available in PHP through PDO:

  http://www.php.net/manual/en/ref.pdo.php

Derrell


Re: [sqlite] thoughts on a web-based front end to sqlite3 db?

2005-03-08 Thread Clay Dowling

Eli Burke said:

> So, I was wondering if any of the more opinionated among you would care
> to suggest an interface language. It'll be on a Linux box, presumably
> running apache although I'm open to alternatives. The app itself uses
> sqlite3 for scheduling jobs and storing job data, so the web interface
> only needs to be able to insert some data and do visualization
> (pretty standard stuff I think).

See this month's Linux journal for my opinions on the matter of interface
languages.  SQLite3 is a dream to work with in a C++ CGI program,
especially true if you make use of my web template library
(http://www.lazarusid.com/libtemplate.shtml).

Python is probably fine as well, as long as you aren't concerned about
performance.

Clay
-- 
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development


Re: [sqlite] Sub-Select

2005-03-08 Thread Michael Knigge
Hi,
sorry... I forgot I get the error "no such column: Sub.Sendung" 
So I guess/hope it's only a "syntax error" with my SQL - my SQL-Skills 
are rather bad ;-(

Thanks,
  Michael

All,
could someone please tell me why this query doesn't work with 3.1.3 
(with 3.0.8 it works):

SELECT   max(Sub.Sendung)
FROM
(SELECT  S.Sendung
 FROM Auftrag AS A,
  Sendung AS S
 WHERE(A.PosyDat = 1 AND A.PosyDat = S.PosyDat) AND
  (A.PosyNId = 6 AND A.PosyNId = S.PosyNId) AND
  (A.DateiNum = 1 AND A.DateiNum = S.DateiNum) AND
  (A.ReprintNum = 0 AND A.ReprintNum = S.ReprintNum) AND
  (S.Sendung >= 1 AND S.Sendung <= 600)
 LIMIT300) AS Sub;
Thanks a lot,
  Michael


Re: [sqlite] Good Graphical Tool for 3.x

2005-03-08 Thread Detlef Groth

Sorry for the delay.

Yes it should run on linux, at least it does on my box. Could you
provide the link which setup.tcl is missing (or a screenshot from the error). I 
know those error windows
are a little bit strange ...

Or you try it from an other linux machine.  May be it is a network
issue. At best the files are on the same machine wherew you are logged in.

regards,
Detlef


>
>Hi!
>Detlef Groth wrote:
>
>>Hello,
>>
>>You can try my program dgSQLite. I recently added sqlite3 support:
>>
>>http://goblet.molgen.mpg.de/dgSQLite3.kit
>>
>>You need a tclkit runtime from:
>>
>>http://www.equi4.com/pub/tk/downloads.html
>>
>>in order to run it.
>>  
>>
>[...]
>I've tried it for Linux (Fedora Core 3) : ./tclkit-linux-x86 dgSQLite3.kit
>and a very long window opened with complains, it begins with "couldn't 
>open "setup.tcl":
>no such file" and so on.
>Does it really work on Linux?
>Igor Gorbounov


[sqlite] Sub-Select

2005-03-08 Thread Michael Knigge
All,
could someone please tell me why this query doesn't work with 3.1.3 
(with 3.0.8 it works):

SELECT   max(Sub.Sendung)
FROM
(SELECT  S.Sendung
 FROM Auftrag AS A,
  Sendung AS S
 WHERE(A.PosyDat = 1 AND A.PosyDat = S.PosyDat) AND
  (A.PosyNId = 6 AND A.PosyNId = S.PosyNId) AND
  (A.DateiNum = 1 AND A.DateiNum = S.DateiNum) AND
  (A.ReprintNum = 0 AND A.ReprintNum = S.ReprintNum) AND
  (S.Sendung >= 1 AND S.Sendung <= 600)
 LIMIT300) AS Sub;
Thanks a lot,
  Michael