On Wed, May 30, 2018 at 8:40 AM, Rob Sargent <robjsarg...@gmail.com> wrote:

>
>
>
> On 05/29/2018 06:36 PM, Adrian Klaver wrote:
>
>> On 05/29/2018 05:10 PM, tango ward wrote:
>>
>>>
>>> Hi,
>>>
>> Not sure where you are pulling the data from and how it is ordered, but
>> an outline:
>>
>> data_input (Assuming sorted by village and then age)
>>
>> for village in data_input:
>>     for age in village:
>>          curr_pgsql.execute('''
>>          INSERT INTO student (created, modified, name,
>>                                       address, age, level)
>>                  VALUES(current_timezone, current_timezone,
>>                         %s, %s, %s, 2)''', (name, village, age))
>>
>>
>>>
>>> Thanks,
>>> J
>>>
>>>
>>
>> You might need random(name)? ;)



Noted. Thank you Sirs. I love you both.

Reply via email to