[web2py] Re: Query Not Supported: (1054, "Unknown column 'daily_counts.add_date' in 'order clause'") No records f

2013-04-16 Thread Dan Kozlowski
Shawn,

I am sorry just getingt back to this. Is this a bug or it sounded like you 
had a work around.


 I get an error saying the column I'm ordering by in the master doesn't 
exist.

>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Query Not Supported: (1054, "Unknown column 'daily_counts.add_date' in 'order clause'") No records f

2013-03-24 Thread Shawn Wheatley
I figured it out. I didn't read the section of the docs on smartgrid well 
enough. I now see you *can* pass multiple values to orderby and fields as a 
dictionary, with the table names as the keys.

Shawn

On Sunday, March 24, 2013 11:21:29 PM UTC-4, Shawn Wheatley wrote:
>
> Hmmm... I also just discovered that specifying fields on the smartgrid 
> causes issues with the child tables. It uses the same fields as the parent, 
> which don't exist and therefore displays empty rows. Is there a way to pass 
> another list of fields for the child table?
>
> On Sunday, March 24, 2013 11:17:24 PM UTC-4, Shawn Wheatley wrote:
>>
>> I am seeing a similar issue using smartgrid for a master-detail invoice 
>> view. When clicking on the link for my detail child records, I get an error 
>> saying the column I'm ordering by in the master doesn't exist. Has this 
>> been resolved yet? Dan, did you open a ticket for this?
>>
>> Shawn
>>
>> On Monday, February 25, 2013 9:01:57 PM UTC-5, Dan Kozlowski wrote:
>>>
>>> *Massimo,
>>>
>>> When I removed the orderby clause it solved problem with the error 
>>> message. but I still need to sort the grid in desc order.
>>> *
>>>
>>>
>>>
>>>
>>> def dailycounts():
>>> grid=SQLFORM.smartgrid(db.daily_counts,  
>>> user_signature=False,create=False,editable=False,deletable=False,*
>>> orderby=~db.daily_counts.add_date*, 
>>> fields=[db.daily_counts.add_date,db.daily_counts.encrypt_count,db.daily_counts.decrypt_count,db.daily_counts.error_count,db.daily_counts.cycle_count,db.daily_counts.directory_create_count,db.daily_counts.client_add_count])
>>> return locals()
>>>
>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Query Not Supported: (1054, "Unknown column 'daily_counts.add_date' in 'order clause'") No records f

2013-03-24 Thread Shawn Wheatley
Hmmm... I also just discovered that specifying fields on the smartgrid 
causes issues with the child tables. Is there a way to pass another list of 
fields for the child table?

On Sunday, March 24, 2013 11:17:24 PM UTC-4, Shawn Wheatley wrote:
>
> I am seeing a similar issue using smartgrid for a master-detail invoice 
> view. When clicking on the link for my detail child records, I get an error 
> saying the column I'm ordering by in the master doesn't exist. Has this 
> been resolved yet? Dan, did you open a ticket for this?
>
> Shawn
>
> On Monday, February 25, 2013 9:01:57 PM UTC-5, Dan Kozlowski wrote:
>>
>> *Massimo,
>>
>> When I removed the orderby clause it solved problem with the error 
>> message. but I still need to sort the grid in desc order.
>> *
>>
>>
>>
>>
>> def dailycounts():
>> grid=SQLFORM.smartgrid(db.daily_counts,  
>> user_signature=False,create=False,editable=False,deletable=False,*
>> orderby=~db.daily_counts.add_date*, 
>> fields=[db.daily_counts.add_date,db.daily_counts.encrypt_count,db.daily_counts.decrypt_count,db.daily_counts.error_count,db.daily_counts.cycle_count,db.daily_counts.directory_create_count,db.daily_counts.client_add_count])
>> return locals()
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Query Not Supported: (1054, "Unknown column 'daily_counts.add_date' in 'order clause'") No records f

2013-03-24 Thread Shawn Wheatley
I am seeing a similar issue using smartgrid for a master-detail invoice 
view. When clicking on the link for my detail child records, I get an error 
saying the column I'm ordering by in the master doesn't exist. Has this 
been resolved yet? Dan, did you open a ticket for this?

Shawn

On Monday, February 25, 2013 9:01:57 PM UTC-5, Dan Kozlowski wrote:
>
> *Massimo,
>
> When I removed the orderby clause it solved problem with the error 
> message. but I still need to sort the grid in desc order.
> *
>
>
>
>
> def dailycounts():
> grid=SQLFORM.smartgrid(db.daily_counts,  
> user_signature=False,create=False,editable=False,deletable=False,*
> orderby=~db.daily_counts.add_date*, 
> fields=[db.daily_counts.add_date,db.daily_counts.encrypt_count,db.daily_counts.decrypt_count,db.daily_counts.error_count,db.daily_counts.cycle_count,db.daily_counts.directory_create_count,db.daily_counts.client_add_count])
> return locals()
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Query Not Supported: (1054, "Unknown column 'daily_counts.add_date' in 'order clause'") No records f

2013-02-25 Thread Dan Kozlowski
*Massimo,

When I removed the orderby clause it solved problem with the error message. 
but I still need to sort the grid in desc order.
*




def dailycounts():
grid=SQLFORM.smartgrid(db.daily_counts,  
user_signature=False,create=False,editable=False,deletable=False,*
orderby=~db.daily_counts.add_date*, 
fields=[db.daily_counts.add_date,db.daily_counts.encrypt_count,db.daily_counts.decrypt_count,db.daily_counts.error_count,db.daily_counts.cycle_count,db.daily_counts.directory_create_count,db.daily_counts.client_add_count])
return locals()

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Query Not Supported: (1054, "Unknown column 'daily_counts.add_date' in 'order clause'") No records f

2013-02-25 Thread Massimo Di Pierro
1) drop or delete the database
2) delete all the .table files in applications/yourapp/databases

On Monday, 25 February 2013 08:31:45 UTC-6, Dan Kozlowski wrote:
>
> I will try the latest build later today. I was also thinking to drop the 
> schema and have DAL build it again. What is the best way to drop a schema 
> and have Web2py build it new ?
>  
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Query Not Supported: (1054, "Unknown column 'daily_counts.add_date' in 'order clause'") No records f

2013-02-25 Thread Dan Kozlowski
I will try the latest build later today. I was also thinking to drop the 
schema and have DAL build it again. What is the best way to drop a schema 
and have Web2py build it new ?
 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Query Not Supported: (1054, "Unknown column 'daily_counts.add_date' in 'order clause'") No records f

2013-02-25 Thread Massimo Di Pierro
Can you check the latest version (nightly)? It would help isolate the 
problem.

On Monday, 25 February 2013 04:53:28 UTC-6, Dan Kozlowski wrote:
>
> I am running 2.3.2 on Linux with MySQL
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Query Not Supported: (1054, "Unknown column 'daily_counts.add_date' in 'order clause'") No records f

2013-02-25 Thread Dan Kozlowski
I am running 2.3.2 on Linux with MySQL


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Query Not Supported: (1054, "Unknown column 'daily_counts.add_date' in 'order clause'") No records f

2013-02-24 Thread Massimo Di Pierro
I cannot reproduce. What web2py version are you using?

$ python web2py.py -S welcome -M
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2013
Version 2.4.1-alpha.2+timestamp.2013.02.23.14.51.03
Database drivers available: SQLite(sqlite3), MySQL(pymysql), 
PostgreSQL(pg8000), MongoDB(pymongo), IMAP(imaplib)
WARNING:web2py:import IPython error; use default python shell
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> db.define_table('daily_counts',
...Field('encrypt_count','integer'),
...Field('decrypt_count','integer'),
...Field('error_count','integer'),
...Field('cycle_count','integer'),
...Field('directory_create_count','integer'),
...Field('client_add_count','integer'),
...Field('client_update_count','integer'),
...Field('client_delete_count','integer'),
...Field('encryption_key_count','integer'),
...Field('add_date','date', unique=True),
...Field('add_time','time'),
...Field('add_db_user','string'),
...Field('add_app_user','string'),
...Field('update_date','date'),
...Field('update_time','time'),
...Field('update_db_user','string'),
...Field('update_app_user','string'))

>>> 
>>> db.define_table('history2',
...Field('client_id','string',length=10),
...Field('command','string',length=255),
...Field('encrypt_key','string',length=50),
...Field('from_dir','string',length=100),
...Field('to_dir','string',length=100),
...Field('archive_dir','string',length=100),
...Field('error_dir','string',length=100),
...Field('in_filename','string',length=100),
...Field('out_filename','string',length=100),
...Field('encryption_type','string'),
...Field('add_dateid',db.daily_counts),
...Field('add_date','date'),
...Field('add_time','time'),
...Field('add_db_user','string'),
...Field('add_app_user','string'))

>>> grid = SQLFORM.smartgrid(db.history2)
>>> 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Query Not Supported: (1054, "Unknown column 'daily_counts.add_date' in 'order clause'") No records f

2013-02-24 Thread Dan Kozlowski
The error occurs on the smargrid when I select the button to go to the 
smartgrid for histories2.

 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Query Not Supported: (1054, "Unknown column 'daily_counts.add_date' in 'order clause'") No records f

2013-02-24 Thread Dan Kozlowski


On Sunday, February 24, 2013 4:52:31 PM UTC-6, Dan Kozlowski wrote:
>
> I am getting the following message when I join the 2 files. 
>
> Query Not Supported: (1054, "Unknown column *'daily_counts.add_date*' in 
> 'order clause'")
> No records found
>
> db.define_table('daily_counts',
>Field('encrypt_count','integer'),
>Field('decrypt_count','integer'),
>Field('error_count','integer'),
>Field('cycle_count','integer'),
>Field('directory_create_count','integer'),
>Field('client_add_count','integer'),
>Field('client_update_count','integer'),
>Field('client_delete_count','integer'),
>Field('encryption_key_count','integer'),
>*Field('add_date','date', unique=True),*
>Field('add_time','time'),
>Field('add_db_user','string'),
>Field('add_app_user','string'),
>Field('update_date','date'),
>Field('update_time','time'),
>Field('update_db_user','string'),
>Field('update_app_user','string'))
>
> db.define_table('history2',
>Field('client_id','string',length=10),
>Field('command','string',length=255),
>Field('encrypt_key','string',length=50),
>Field('from_dir','string',length=100),
>Field('to_dir','string',length=100),
>Field('archive_dir','string',length=100),
>Field('error_dir','string',length=100),
>Field('in_filename','string',length=100),
>Field('out_filename','string',length=100),
>Field('encryption_type','string'),
>   * Field('add_dateid',db.daily_counts),*
>Field('add_date','date'),
>Field('add_time','time'),
>Field('add_db_user','string'),
>Field('add_app_user','string'))
>
>
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Query Not Supported: (1054, "Unknown column 'daily_counts.add_date' in 'order clause'") No records f

2013-02-24 Thread Massimo Di Pierro
Where is the query that cases the error? The error is not caused when 
tables are created.

On Sunday, 24 February 2013 16:52:31 UTC-6, Dan Kozlowski wrote:
>
> I am getting the following message when I join the 2 files. 
>
> Query Not Supported: (1054, "Unknown column *'daily_counts.add_date*' in 
> 'order clause'")
> No records found
>
> db.define_table('daily_counts',
>Field('encrypt_count','integer'),
>Field('decrypt_count','integer'),
>Field('error_count','integer'),
>Field('cycle_count','integer'),
>Field('directory_create_count','integer'),
>Field('client_add_count','integer'),
>Field('client_update_count','integer'),
>Field('client_delete_count','integer'),
>Field('encryption_key_count','integer'),
>*Field('add_date','date', unique=True),*
>Field('add_time','time'),
>Field('add_db_user','string'),
>Field('add_app_user','string'),
>Field('update_date','date'),
>Field('update_time','time'),
>Field('update_db_user','string'),
>Field('update_app_user','string'))
>
> db.define_table('history2',
>Field('client_id','string',length=10),
>Field('command','string',length=255),
>Field('encrypt_key','string',length=50),
>Field('from_dir','string',length=100),
>Field('to_dir','string',length=100),
>Field('archive_dir','string',length=100),
>Field('error_dir','string',length=100),
>Field('in_filename','string',length=100),
>Field('out_filename','string',length=100),
>Field('encryption_type','string'),
>   * Field('add_dateid',db.daily_counts),*
>Field('add_date','date'),
>Field('add_time','time'),
>Field('add_db_user','string'),
>Field('add_app_user','string'))
>
>
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.