Thanks. Doing that already.
On Tue, 1 May 2018, 18:55 Richard Vézina
wrote:
> I really recommand you to go through this book chapiter :
>
> http://web2py.com/books/default/chapter/29/02/the-python-language
>
> You will learn a lot of thing over which you fall right now.
>
> You also can use type
Are you querying multiple table?? You can do a join... That way you will
have all the value for every fields the only catch is that when you join to
disambiguate fields names dal use table.field instead of just field as
field name so it migth happen that if you call "manually" vs
"programmatically"
Thanks.
It iterates well giving some fields data, but not all as needed. I get data
from some 4 fields only. I have about 60 in some db. Plus there is this:
On Tue, 1 May 2018, 16:44 Richard Vézina
wrote:
> for f, v in row:
>
> Should be
>
> for f, v in row.iteritems():
>
> k, v for key, value,
for f, v in row:
Should be
for f, v in row.iteritems():
k, v for key, value, but I use f instead of k because you will have
field_name and value in this for loop...
Richard
On Mon, Apr 30, 2018 at 11:39 PM, Maurice Waka
wrote:
> What would f, v be.
> I get this error : ValueError : too many
What would f, v be.
I get this error : ValueError : too many values to unpack
On Mon, 30 Apr 2018, 20:38 Richard Vézina
wrote:
>
>
> On Mon, Apr 30, 2018 at 1:21 PM, Maurice Waka
> wrote:
>
>> Sorry I tried to clarify by my new question :
>>
>> If I have a column with data like db.persons with
Thank you. Let me work on it.
Regards
On Mon, 30 Apr 2018, 20:38 Richard Vézina
wrote:
>
>
> On Mon, Apr 30, 2018 at 1:21 PM, Maurice Waka
> wrote:
>
>> Sorry I tried to clarify by my new question :
>>
>> If I have a column with data like db.persons with data like
>> Carl
>> Junior
>> Maggie
>>
On Mon, Apr 30, 2018 at 1:21 PM, Maurice Waka wrote:
> Sorry I tried to clarify by my new question :
>
> If I have a column with data like db.persons with data like
> Carl
> Junior
> Maggie
> Tom
> Derrick
>
> And each column name has other fields with data such as:
> persons.name persons.age per
Sorry I tried to clarify by my new question :
If I have a column with data like db.persons with data like
Carl
Junior
Maggie
Tom
Derrick
And each column name has other fields with data such as:
persons.name persons.age persons.location persons.occupation
persons.interests
Carl 23 London Neuroscie
Man this is convulated...
Not sure what is in name4 "name4 is a list that contains items found in
db.health.name, as well as other dbs." what items are you referring at??
What other dbs?
Why are you connecting to sqlite by your own...
This check is just weird :
if id == item in name4:
I would
Thanks, but I seem to be having a challenge when returning the rows from a
specific id name or number. I tried this on a different app as follows:
Model:
db.define_table( "health",
Field('name', 'string'),
Field('definition', 'text', length= 100, default="We'll
for f in db.table.fields:
print f
or
rows = db(db.fruits.id > 0).select(db.fruits.ALL) # ALL means all fields
for r in rows:
print(r)
You can control which field you want with the previous example
myfields = [f for f in db.table.fields if
SOME_FILTERING_CHECK_OVER_THE_FIELD_YOU_WANT]
Addendum
I want a single list of the items (the data from all fields)
regards
On Fri, Apr 27, 2018 at 5:06 PM, Maurice Waka wrote:
> There are several fields in my db such as this:
>
> db.define_table('fruit', Field('id', 'reference auth_user'),
> Field('apple','boolean',label=T('Apple')),
There are several fields in my db such as this:
db.define_table('fruit', Field('id', 'reference auth_user'),
Field('apple','boolean',label=T('Apple')),
Field('apricot','boolean',label=T('Apricot')),
Field('cherry','boolean',label=T('Cherry')), Field('fig','boolean',
label=T('Fig')), Field('lyc
13 matches
Mail list logo