At 11:34 AM +0100 11/1/01, Harald Fuchs wrote:
>In article ,
>Paul DuBois <[EMAIL PROTECTED]> writes:
>
>> [snip]
>>> Of all the methods suggested I like the look of the one above and will
>>> try that one first.
>>>
>>> $count = $sth->fetchrow_array();
>>
At 4:10 PM -0800 10/31/01, Bill Adams wrote:
>Paul DuBois wrote:
>
>> [snip]
>>
>> >Of all the methods suggested I like the look of the one above and will
>> >try that one first.
>> >
>> >$count = $sth->fetchrow_array();
>> >
>> >$rows = $sth->rows()
>>
>> Note that use of rows() to get th
Paul DuBois wrote:
> [snip]
>
> >Of all the methods suggested I like the look of the one above and will
> >try that one first.
> >
> >$count = $sth->fetchrow_array();
> >
> >$rows = $sth->rows()
>
> Note that use of rows() to get the row count for a SELECT is deprecated
> in the DBI docs, which s
[snip]
>Of all the methods suggested I like the look of the one above and will
>try that one first.
>
>$count = $sth->fetchrow_array();
>
>$rows = $sth->rows()
Note that use of rows() to get the row count for a SELECT is deprecated
in the DBI docs, which say that if you want to know the number o
In message , Paul DuBois
<[EMAIL PROTECTED]> writes
>At 12:43 AM + 10/31/01, Mark Worsdall wrote:
>>Hi,
>>
>>I want to alter this statement so it returns the number of records.
>>
>>$prep = "SELECT COUNT(*) FROM go.objectives WHERE subjects_id='1' AND
>>su
t;MySQL" <[EMAIL PROTECTED]>
Sent: Tuesday, October 30, 2001 7:43 PM
Subject: HOW do I return the results of a count to a variable
> Hi,
>
> I want to alter this statement so it returns the number of records.
>
> $prep = "SELECT COUNT(*) FROM go.objectives WHERE subjects_
At 12:43 AM + 10/31/01, Mark Worsdall wrote:
>Hi,
>
>I want to alter this statement so it returns the number of records.
>
>$prep = "SELECT COUNT(*) FROM go.objectives WHERE subjects_id='1'
>AND subjectHeadings_id='2' ORDER BY displayOrder";
>
>$sth = $dbh->prepare($prep);
>
>$sth->execute;
>
Have you tried using the $rows = $sth->rows() after you execute to get the total
rows returned?
>>On Wed, 31 Oct 2001 00:43:00 +, Mark Worsdall <[EMAIL PROTECTED]> wrote:
>>Hi,
>>
>>I want to alter this statement so it returns the number of records.
>>
>>$prep = "SELECT COUNT(*) FROM go.o
Hi,
I want to alter this statement so it returns the number of records.
$prep = "SELECT COUNT(*) FROM go.objectives WHERE subjects_id='1' AND
subjectHeadings_id='2' ORDER BY displayOrder";
$sth = $dbh->prepare($prep);
$sth->execute;
So what I need to do is add the COUNT statement into the ab