On Monday 30 December 2002 21:33, Chris Boget wrote:
> Due to writing this email *way* too early in the morning, I got
> everything mixed up and didn't say what I meant.  The below
> is what I really meant.
>
> > Not sure what you're getting at here. Surely for any particular
> > query, _you_ would know what table(s) is/are being used?
>
> That's not necessarily true.  Certainly not if you are using an
> abstraction layer to access the database.  Take PEAR for
> example.  When instantiation on object, you give it the relevant
> connection information.  When you pass a query to the query()
> there's no way (ok, there's a way but it isn't necessarily accurate)
> to get the table name for the query that was just run... apart from
> requiring the programmer to pass the table name as another
> paramter to the query() method   You can do this in mysql using
> the mysql_tablename() function.
> I just don't know why you can't do this in pgsql.

Either you're confused or I'm confused :)

mysql_tablename() is used in conjunction with mysql_list_tables() to get the 
names of the tables defined in the specified database. It cannot "get the 
table name for the query that was just run...". And another thing, you _know_ 
the query "that was just run", and presumably the tables used is part of the 
query itself, so why would you need another function to tell you should 
already know? Can you give an example of what you're trying to do?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Q:      How did you get into artificial intelligence?
A:      Seemed logical -- I didn't have any real intelligence.
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to