[kronolith] kronolith and oracle

Liam Hoekenga liamr@umich.edu
Mon, 29 Apr 2002 22:44:41 -0400 (EDT)


> Are there problems with those when using ANSI join syntax? I thought I'd
> worked out the code so that it was portable...

Oracle 8 doesn't use the ANSI join syntax.  I'm told Oracle 9 does.

	mysql:
	select ug.group_id from phpbt_user_group ug
	left join phpbt_auth_group g using (group_id)
	where user_id = 2 and group_name <> 'User'

	oracle:
	select ug.group_id from phpbt_user_group ug,
		phpbt_auth_group g
	where g.group_id = ug.group_id(+) and
	user_id = 2 and
	group_name <> 'User'

I had a heck of a time w/ this when trying to get a mysql php application
working with oracle.

The biggest problem I ran into was that the mysql joins happen in the FROM
portion of the sql, while the oracle stuff happens in the WHERE, and hence
the WHERE portion of the mysql statements had to become ANDs.

I've not had any outer join problems w/ the horde applications (yet...
looks like it'll pop up if we try WHUPS).

I was merely suggesting if someone added datetime abstraction to something
(PEAR DB? adodb?), it would be cool if they'd also add join abstraction.
I realize they don't have much to do with eachother.. just a wish list.

Liam