in reply to fetching rows problem
You should do ($rows) = $st->fetchrow_array();
The reason for this is that you want the first element of the returned array in your $row - if you do it without the parens, you will get the number of elements in the array, which is not what you want.
For your second problem, change your SQL to SELECT count(*) as c FROM members. Once you've done that, you can reference the value as $$row{c}.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: fetching rows problem
by cchampion (Curate) on Feb 25, 2004 at 23:50 UTC |