>
> Forgive me for a basic/simple question. If I already have a mysql db/tbl
> schema, so I've already created my test mysql db/tbls...
>
> How can i simply read the tbl, and then insert a test row/value with a tbl
> that has an id of a varchar?
>
> sample mysql db
>
> use test; //test db name
>
> create table foo (id varchar(10) not null default '',
> name varchar(10) not null default '',
> primary (id));
>
> so oi already have a test table 'foo' that has some test data that i
> inserted via the mysql command line.
You can import names etc. from your existing table.
So maybe following code can help.
Of course you have to create a proper connection and a
sqlhub.processConnection at the begening according to location of the file
on your PC.
class Foo(SQLObject):
class sqlmeta:
# table = 'foo_foo' # you can give the name to the object,
# this name can differ from the table name
fromDatabase = True
idName = "foo_id_name"
idType= str
HTH
Petr
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss