Hi,

I am in the situation of a self-referencing table. SELECTs of the form

        SELECT ... FROM forumcomment start, forumcomment thread
        WHERE thread.reply = start.id

don't really work. I am using the following recordset setup:

{
'!Fields' => 'troot.id, troot.title, troot.created, count(trep.id) as ccount, 
max(trep.created) as cnew',
'!Table' => 'forumcomment troot, forumcomment trep, users',
'!TabRelation' => 'troot.id=trep.throot and troot.creator=users.id'
'$where' => "troot.forum_id=$forid and troot.replyid IS NULL"
'$group' => 'troot.id, troot.title, troot.created',
'$order' => 'troot.created DESC',
'!LongNames' => 1
}

Data::Dumping the recordset shows that the resulting SELECT statement is
correct. The database returns records when I do this SELECT manually,
but the recordset won't contain any records.

It seems to me that DBIx (version 0.23) uses internal tablenames like
"forumcomment start" and gets confused.

What's necessary to make this work?

Best regards,

        Jochen

-- 
Jochen Lillich                  http://geewiz.teamlinux.de

     The three Rs of Microsoft support: Retry, Reboot, Reinstall.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to