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 cycle it through with DBI like:
while(@array = $sth->fetchrow_array){
#-- @array holds a single row from table
#-- $array[0] is the first field of the row
#-- $array[1] is the second field of the row
#-- ... etc
#-- i think you get the idea right?
}
to find out how many rows are in the table, try:
SELECT COUNT(*) FROM table;
david
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]