---------- Forwarded message ----------
From: Flavio Coelho <fccoelho@gmail.com>
Date: 28/10/2005 08:00
Subject: Re: [SQLObject] queries with sqlobject
To: Rene Dudfield <renesd@gmail.com>



2005/10/28, Rene Dudfield < renesd@gmail.com>:

eg.
db_connection = connectionForURI('your db connection string')
rows = db_connection.queryAll('select * from sometable')


Thanks, I didn't now that. I using MySQLdb for that now. But it would be nice if  there was a way to do queries in an object style. In my problem, if I could create a SQlObject instance from a database table, I could just do a dir(instance) to get column names instead of using the standard SQL query (show fields from my_table) on the connection.

Really handy for when sqlobject can't do what you want.


It would be nice if this was in the documentation somewhere.  Listed
as a feature.

totally agree.

Flávio

On 10/28/05, Flavio Coelho < fccoelho@gmail.com > wrote:
> I have been using SQLObject for writing to a mysql database for a while now,
> and I am very happy with its very straightforward interface.
>
>  Now I want to do some queries and I am facing some problems:
>
>  My problem is as following:
>  I have database tables created before by SQLObject.
>  I Need to do the equivalent of a "show tables" SQL command to see what
> tables are available.
>  Get a list of strings with the names of the tables in my database. Select
> one of these and check which columns they have(get a list of column names).
>  I have no Idea of how to do this with SQLObject although this is a very
> basic thing in SQL.
>
>  can anyone tell me how to accomplish this with SQLObject?
>
>  thanks in advance,
>
> --
> Flávio Codeço Coelho
> registered Linux user # 386432
> ---------------------------
> Great spirits have always found violent opposition from mediocrities. The
> latter cannot understand it when a man does not thoughtlessly submit to
> hereditary prejudices but honestly and courageously uses his intelligence.
>         Albert Einstein
>


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss



--

Flávio Codeço Coelho
registered Linux user # 386432
---------------------------
Great spirits have always found violent opposition from mediocrities. The
latter cannot understand it when a man does not thoughtlessly submit to
hereditary prejudices but honestly and courageously uses his intelligence.
        Albert Einstein


--
Flávio Codeço Coelho
registered Linux user # 386432
---------------------------
Great spirits have always found violent opposition from mediocrities. The
latter cannot understand it when a man does not thoughtlessly submit to
hereditary prejudices but honestly and courageously uses his intelligence.
        Albert Einstein