I am receiving this error:[INDENT]Column 'position' in order clause is ambiguous.[/INDENT]
when running this SQL:
$sql = "SELECT ".$table_prefix."nulavatar_layers.id,
".$table_prefix."nulavatar_layers.name,
".$table_prefix."nulavatar_layers.position,
".$table_prefix."nulavatar_tabs.id,
".$table_prefix."nulavatar_tabs.name,
".$table_prefix."nulavatar_tabs.position
FROM ".$table_prefix."nulavatar_layers, ".$table_prefix."nulavatar_tabs
ORDER BY position DESC";
I'm not entirely sure why, though. "position" is a row in both tables, so should it not work? I tried changing that to this:
".$table_prefix."nulavatar_layers.position, ".$table_prefix."nulavatar_tabs.position
But to no avail. It's not like I can't go on without having it ordered, but it'd be very helpful if I could find out how to do this.