Hi,

I see your point re:

>Some code to illustrate:
>
>printf "Query: %s\n", $query;
>my $sth = $dbh->prepare ($query);
>$sth->execute();
># metadata information becomes available at this point ...
>printf "NUM_OF_FIELDS: %d\n", $sth->{NUM_OF_FIELDS};
>print "Note: query has no result set\n" if $sth->{NUM_OF_FIELDS} == 0;

but what I really want to do is determine at an early stage if I have any results at all in my result set. Actual reason for this is that I'm doing a SELECT WHERE query and scanning my entrire DB for a session ID that matches one read from a cookie. I then want to determine if this is a valid session id and if not re-direct the user to a page saying "unrecongnised session id" or something.

Thanks,


Jeff

---------------------------------------------------------------------
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