Re: HELP: mySQL table name
| From: | John W. Holmes | Date: | Tue, 06 Apr 2004 13:20:55 +0000 |
| Subject: | Re: HELP: mySQL table name | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-33764@lists.php.net to get a copy of this message | ||
From: "Adrian Donoiu" <a.donoiu@atcrom.ro>
> I need information about how can I get the table name from this query :
> select * from test_table as t
> when I use :
> $field=mysql_fetch_field($result, $i);
> $field->table return the name of the table as "t" but I need the real
> name of the table "test_table".
> How can I do it?
You can't. If you alias the table as "t", then that's the table name. Either
don't use an alias or write a function that'll parse the query to retrieve
the table name.
---John Holmes...