[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 of rows
in a result set, fetch and count them.  (The reason is that rows()
just doesn't work at all for some database engines.  On the other hand,
it appears to work just fine for MySQL...)

>
>$count = $dbh->selectrow_array (
>     "SELECT COUNT(*) FROM go.objectives WHERE subjects_id='1' AND
>      subjectHeadings_id='2'");
>
>
>Thankyou all.
>
>--
>Home:- hinwickATworsdall.demon.co.uk    WEB:- http://www.worsdall.demon.co.uk
>Shadow:- webmasterATshadow.org.uk       WEB:- http://www.shadow.org.uk


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to