> Either you're confused or I'm confused :) It's me. This just hasn't been a good week for me. :p One time I'll get it right! > 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...".
You are right. The function I was thinking of was mysql_field_table() I knew I should have consulted the documentation and not relied on my memory. :p > And another thing, you _know_ the query "that was just run", and presumably > the tables used is part of the query itself, That's not true in all cases. > 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? Sure. And this is what prompted my message initially. PEAR's sql2xml only works with mysql because there's no way to get the table name programatically. When you are using an abstraction such as this, unless you pass another argument to the primary function, you have to go through hoops within the abstraction just to pull it out of the query. The code for sql2xml can be found here: http://pear.php.net/package-info.php?pacid=18 Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php