PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Oliver Scheit <oscheit at quoka dot com>
Subject: Re: How to Count Rows?
Date: Jun 3 1999 3:37PM

...just like Michael said.
Thanx. I did that.
Greetings, Oli

rj schrieb:

> 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
> >
> >