you have to fetch all the rows into a list and then count how many items
in the list.


Jonathan Hayward http://JonathansCorner.com wrote:
> I thought I had asked this question before and gotten an answer, but I
> searched and didn't find it (I'm getting a little ragged):
>
> How do I tell how many rows are in a ResultProxy object?
>
> I have: number_of_slots = search_results.count() #search_results is a
> ResultProxy
>
> which is getting:
>
> Traceback (most recent call last):
>   File
> "/server1/users/jonathan/creations/inventions/software/insight/alchemy",
> line 5876, in ?
>     multitasking.start_oracle()
>   File
> "/server1/users/jonathan/creations/inventions/software/insight/alchemy",
> line 3486, in start_oracle
>     self.run_oracle()
>   File
> "/server1/users/jonathan/creations/inventions/software/insight/alchemy",
> line 3447, in run_oracle
>     self.handle_oracle_query(newsocket, address)
>   File
> "/server1/users/jonathan/creations/inventions/software/insight/alchemy",
> line 3394, in handle_oracle_query
>     generate_output()
>   File
> "/server1/users/jonathan/creations/inventions/software/insight/alchemy",
> line 5175, in generate_output
>     current_frame.display()
>   File
> "/server1/users/jonathan/creations/inventions/software/insight/alchemy",
> line 2788, in display
>     build_output_for_appropriate_search_results()
>   File
> "/server1/users/jonathan/creations/inventions/software/insight/alchemy",
> line 4635, in build_output_for_appropriate_search_results
>     build_output_for_navigation(search_results)
>   File
> "/server1/users/jonathan/creations/inventions/software/insight/alchemy",
> line 4669, in build_output_for_navigation
>     number_of_slots = search_results.count()
> AttributeError: ResultProxy instance has no attribute 'count'
>
>
> --
> ++ Jonathan Hayward, [EMAIL PROTECTED]
> ** To see an award-winning website with stories, essays, artwork,
> ** games, and a four-dimensional maze, why not visit my home page?
> ** All of this is waiting for you at http://JonathansCorner.com
>
> ** If you'd like a Google Mail (gmail.com) account, please tell me!
>



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to