On Aug 27, 2:37 pm, TYR <[EMAIL PROTECTED]> wrote:
> There's always the naive option.
>
> query = ('species', 'lifestyle', 'coolness', 'tentacles=>8')
> db.execute('SELECT %s, %s, %s % FROM creatures WHERE %s;' % query)
> record = dict(zip((query), (db.fetchall()))
> array = '''{
> '''
There's always the naive option.
query = ('species', 'lifestyle', 'coolness', 'tentacles=>8')
db.execute('SELECT %s, %s, %s % FROM creatures WHERE %s;' % query)
record = dict(zip((query), (db.fetchall()))
array = '''{
'''
for k,v in record:
array.append('"(k)":"(v)"')
array.append('
On Aug 26, 3:15 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
> jpuopolo wrote:
> > All:
>
> > I am using Python to read some records from the MySQL database. I am
> > using the mysqldb library, and things are working well.
>
> > Now, I would like to pass back the results of the query to a Web-based
>
jpuopolo wrote:
All:
I am using Python to read some records from the MySQL database. I am
using the mysqldb library, and things are working well.
Now, I would like to pass back the results of the query to a Web-based
front end, and I would like to use JSON. Is there a library/example of
creatin