开发者

How find the real table name of one field in mysql with php?

I have this query in my PHP code:

SELECT usr.user_id,online.online_totime
 FROM users AS usr
 LEFT JOIN online_users AS online ON online.online_u开发者_如何学Cser=usr.user_id

I want to find tables in this query with PHP. I use mysql_field_table and it returns "usr" and "online" as table names: those are not the real names. How I can find real table names of fields?

This query only is an example. Please don't advise me not to use AS synonym.


You could parse the query, as one commenter of the php.net documentation suggests.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜