> I need to look up a table's foreign keys using the unified ODBC-functions.
> 'odbc_foreignkeys()' requires me to pass seven parameters, each of them
being
> mandatory, to archive this.

Yes.

> Because the approach is not intuitive anyhow and there is no documentation
> available except of the PHP-manual's prototype, neither me nor my
co-workers
> have any idea of how to apply the function.

There *IS* some explanatory text about what happens depending on which args
you fill in.

Presumably you use "" for any args you don't care to fill in.

> The manual states that three of the arguments are superfluous, depending
on
> the application; but the prototype contradicts this, declaring them
mandatory.

Use "" on args you don't care about.  The function doesn't need them, but
PHP only allows leaving out arguments at the end of the list, not the
middle, so the "optional" argument language feature was probably not all
that useful.

> Can anyone please point me to a working code example or provide one?

That I can't do...

As near as I can figure, the pk_qualifier and pk_owner, and fk_qualifier and
fk_owner args are not needed?  Or, perhaps, if you specify them, the result
set is filtered down some way...

Try calling it with "" for all the arguments you don't understand, and see
what you get.

> Btw, how are the inter-table relationships defined at all? I cannot think
of
> a way to determine foreign keys without complete knowledge of all joins
and
> subqueries potentially run against the database.

When you CREATE a table, you can declare a given COLUMN as a "FOREIGN KEY".
If you didn't do that, this function is pretty useless to you...

PS  If you do figure something out, contribute to the notes, eh?

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to