On 3/25/06, coulix <[EMAIL PROTECTED]> wrote:
>
> i got it working :
>
> def _module_get_top_users(limit):
> cursor = db.cursor()
> cursor.execute("""
> SELECT auth_users.username, COUNT(*) AS count
> FROM auth_users,
i got it working :
def _module_get_top_users(limit):
cursor = db.cursor()
cursor.execute("""
SELECT auth_users.username, COUNT(*) AS count
FROM auth_users, recettes_recipes
WHERE auth_users.id=
On 3/24/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> coulix wrote:
> > Hello,
> > I was trying to play with custom query but i didnt manage to get it
> > working,
>
> I too could not get the custom query from the API reference working:
>
> polls.get_list(
> select={
> 'choice_c
coulix wrote:
> Hello,
> I was trying to play with custom query but i didnt manage to get it
> working,
I too could not get the custom query from the API reference working:
polls.get_list(
select={
'choice_count': 'SELECT COUNT(*) FROM choices WHERE poll_id =
polls.id'
}
)
Tryin
Dropping down to the raw SQL level is easy...
Assuming my_sql_command is a string with your select statement...
from django.core.db import db
cursor = db.cursor()
cursor.execute( my_sql_command )
row = cursor.fetchone()
result = row[0]
You might prefer fetchall(), but I leave the data gather
Hello,
I was trying to play with custom query but i didnt manage to get it
working,
for example this one whcih i found on the mail list :
Polls.get_list(
select={
'choice_count': {
db_table='choices',
db_columns=['COUNT(*)']
kwargs={
Hello,
I was trying to play with custom query but i didnt manage to get it
working,
for example this one whcih i found on the mail list :
Polls.get_list(
select={
'choice_count': {
db_table='choices',
db_columns=['COUNT(*)']
kwargs={
7 matches
Mail list logo