i can't get my noggin' around this...but i'm pretty sure it's what i need to do...
ok...i'll try to explain this...i'm trying to create a "tree"...
i have two tables..."sections" and "main"...i need to JOIN these tables so i can obtain new id values for all and then ORDER this information...i also need to ORDER where sections.secid=main.mainsecid...AND...this is a bonus, i also need to have the query identify which values are from sections so i can treat them slightly different on the output (but i'll get to this later)...
sections
secid (auto)
section
secident (only equal '0' or NULL)
main
id (auto)
maintemplid
mainsecid (from section.secid)
title
what the output is supposed to do...
if $secident = '0' then print
$secid,0,$section
else print
$new_ID_from_join,$secid,$title,$maintemplid
looped through everything in the joined table...i guess...???
(the more i try to write this query the more confusing it becomes...why doesn't mysql just explain what a join is)...
will it even create a new id for me? or do i need to create a whole new table each time this script is called up...this can't be this difficult...
or could it be? i shouldn't post this...but maybe somebody might understand something i've said here... 😕
vaska