El sábado, 11 de enero de 2020, 18:38:44 (UTC+1), Mohsen Pahlevanzadeh
escribió:
>
> Hello everybody,
>
> I can write django code for "select * from mytables;", but I can't
> specefic fields such as "select field(s) from my table;"
>
> Please help me..
>
Hi, first you may connect, is ex
You can query like this in Django, say A is the table name and B is the
columns. A.objects.all().values('B') or
A.objects.all().values_list('B',flat=True)
Regards,
San
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this g
use values().
example:
Foo.objects.filter(name='foo').values('bar', 'baz')
2020年1月12日(日) 2:38 Mohsen Pahlevanzadeh :
> Hello everybody,
>
> I can write django code for "select * from mytables;", but I can't
> specefic fields such as "select field(s) from my table;"
>
> Please help me..
>
> -
You can query like this in Django, say the table name is A and column name is
name.
A.objects.all() will give all the objects and A.objects.filter(name='Django')
will give all the objects whose name is Django.
--
You received this message because you are subscribed to the Google Groups
"Django
Hello everybody,
I can write django code for "select * from mytables;", but I can't specefic
fields such as "select field(s) from my table;"
Please help me..
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group a
5 matches
Mail list logo