Free Selects in DB, who already did it?

hi there,

i´m going to rewrite AutoTake for RT 3.0 and add some nice
features to it, like subject-parsing, i want to give the ticket
somebody depending on the subject and so on…

but my big problem ist, who do i get the database-handle
and how do i make free selects ??

i tried the following, but it´s not working:

$self->{'table'} = "AutoTake";

$self->{‘primary_key’} = ‘id’;
my $ab = $self->LoadById($queueid);

i have a table like:

id int(11) unsigned NOT NULL default ‘0’,
User_id int(11) unsigned NOT NULL default ‘0’,

INSERT INTO AutoTake VALUES(“1”, “127”);

i want to make a select like:

SELECT User_id FROM AutoTake WHERE id=1

to get the user with the id “127”…

i´m really despairing of this ;-((( cause all these modules are quite easy,
but i never worked with that DBI module and i find this a little bit
difficult to work with that…cause debugging is also not easy…

thx for any help !!!
best regards,

– michab, on 11.07.2003