[eluser]Tom Vogt[/eluser]
[quote author="WanWizard" date="1288094100"]what does
Code:
$regions->check_last_query();
tell you? Looking at the SQL generated makes it easier to spot the problem.[/quote]
It tells me:
Code:
SELECT `regions`.*
FROM (`regions`)
LEFT OUTER JOIN `froms_toes` from_froms_toes ON `regions`.`id` =
`from_froms_toes`.`to_id`
WHERE `from_froms_toes`.`from_id` = 1
what the correct result (basically) should be, is something like:
Code:
SELECT A.xpos, A.ypos, B.xpos, B.ypos
FROM regions A
JOIN froms_toes ON from_id = A.ID
JOIN regions B ON to_id = B.ID
I know my query design is very likely the problem, but I can't at the moment wrap my head around what I should be doing.