Home >Backend Development >PHP Tutorial >帮忙改下一条查询语句,该怎么处理

帮忙改下一条查询语句,该怎么处理

WBOY
WBOYOriginal
2016-06-13 10:18:24835browse

帮忙改下一条查询语句
SHOW TABLES

显示的当前数据表名称,
但是这个结果集的列名称是"Tables_in_myoffice",myoffice是我的数据库名,我想把它设定为一个常量字符串,比如
"tbnames",应该怎么写到这个查询语句里去?
show tables as "tbnames";
好像不对呀

------解决方案--------------------
SHOW 不支持用 AS 。
不一定非要这样做,你完全可以按数字索引来取值 mysql_fetch_row() mysql_result();

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn