|
|
sybperl-l Archive
Up Prev Next
From: rj <rj at chele dot cais dot net>
Subject: Re: How to Count Rows?
Date: Jun 2 1999 6:05PM
You might try defining an IDENTITY column for the table, then the
server would do the job for you.
On Wed, 2 Jun 1999, Oliver Scheit wrote:
> Hi everybody !
> I'm having trouble ! Here's part of the script:
>
> $dbrec = 0;
> $dbrec = $q->ct_sql("select count (*) from my_table");
> $dbrec++;
> $q->ct_execute("insert into my_table values ($dbrec, 'Test')");
>
> What I'm trying to do is:
>
> Number Text
> -------- ------
> 1 Test
> 2 Test
> 3 Test
>
> I'm used to using dBase tables - there you can define an
> auto-incremental Column.
> Or just call Table.RecordCount using Delphi, etc etc.
>
> If anybody could help me, I'd be grateful !
>
> Thanx and greetings,
> Oli
>
>
|