aed0$3864a8c0@comice">news:000701c26887$8a8daed0$3864a8c0@comice...
> > -Original Message-
> > From: dan [mailto:[EMAIL PROTECTED]]
> > Sent: 30 September 2002 13:55
> > To: [EMAIL PROTECTED]
> > Subject: Re: SQL Table Rows
> >
> >
> sn
On Tuesday 01 Oct 2002 12:14 pm, Felix Geerinckx wrote:
> on Tue, 01 Oct 2002 10:50:26 GMT, [EMAIL PROTECTED]
>
> (Gary Stainburn) wrote:
> > Nobody's mentioned:
> >
> > $countrow=$sth->rows;
> >
> > This way is more efficient that doing the 'select count(*)' as
> > it's done from the same select
on Tue, 01 Oct 2002 10:50:26 GMT, [EMAIL PROTECTED]
(Gary Stainburn) wrote:
> Nobody's mentioned:
>
> $countrow=$sth->rows;
>
> This way is more efficient that doing the 'select count(*)' as
> it's done from the same select query, and it also means that yo
> know beforehand how many rows you w
On Tuesday 01 Oct 2002 2:53 am, Hengky wrote:
> > > How is it possible to cycle through an SQL table row by row, without
> > > having to increment an ID by 1 in a while loop and go
> > > SELECT * FROM table WHERE id=$id
> > > ?
> > > And how can I find out how many rows are in the table?
>
> i hop
> > How is it possible to cycle through an SQL table row by row, without having
> > to increment an ID by 1 in a while loop and go
> > SELECT * FROM table WHERE id=$id
> > ?
> > And how can I find out how many rows are in the table?
> >
i hope this one can help you i'm using MySQL on my server
Dan wrote:
> How is it possible to cycle through an SQL table row by row, without
> having to increment an ID by 1 in a while loop and go
> SELECT * FROM table WHERE id=$id
> ?
> And how can I find out how many rows are in the table?
>
> Dan
have you try:
SELECT * FROM table;
and then just cy
Dan,
In MySQL I don't know how you can do, but I believe that in theory is the same thing.
#!/usr/bin/perl
use Pg;
$db= Pg::connectdb("dbname=database");
open (FILE, ">>/var/log/file.log");
$result = $db->exec("SELECT * FROM table;");
for($i=0;$i<$result->ntuples;$i++) {
> -Original Message-
> From: dan [mailto:[EMAIL PROTECTED]]
> Sent: 30 September 2002 13:55
> To: [EMAIL PROTECTED]
> Subject: Re: SQL Table Rows
>
>
snip
> __ START __
> $id = 1;
> $sth = $dbh->prepare("SELECT * FROM table WHERE id
Hi Dan,
I'm used to PostgreSQL, but using DBI, that shouldn't matter for what we're
doing.
On Monday 30 Sep 2002 1:54 pm, dan wrote:
> right, this is like an outline to what i want to be able to achieve..
>
> -- my table ---
> row # : id , myid2 , myid3
> ---
right, this is like an outline to what i want to be able to achieve..
-- my table ---
row # : id , myid2 , myid3
---
row 1 : 1 , item 1 , item 2
row 2 : 2 , item 3 , item 4
row 3 : 3 , item 5 , item 6
row 4 : 4 , item 7 , item 8
Dear Dan,
I don't know if I understood what you really want. Therefore I will try to help, ok.
I use Postgres as Database.
You can find out how many rows have in a table after you run a SQL like this.
#!/usr/bin/perl
use Pg;
$db= Pg::connectdb("dbname=database");
# This
How is it possible to cycle through an SQL table row by row, without having
to increment an ID by 1 in a while loop and go
SELECT * FROM table WHERE id=$id
?
And how can I find out how many rows are in the table?
Dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
12 matches
Mail list logo