mysql查询替换选择全部

时间:2012-02-24 07:59:34

标签: php mysql

  

$ sql =“选择a.time a.company a.deptime,a.destime,a.flight,   a.year,a.month,a.day,“。$ ticket_to_heaven。”如   “。$ this-> condition ['type']。”,“。$ seat。”如   “。$ this-> condition ['type']。”_ s,a.company,a.time from   ".$this->TBLNAME." a \ n“;

我想把它改成 $ sql =“select * from ....”

但我是'a'偷偷摸摸的错误输出。多么糟糕的'a'!有人可以帮忙吗? 谢谢

[UPDATE]

我把它改成了这样的东西:

  

$ sql =“选择一个。*,”。$ ticket_to_heaven。“as   “。$ this-> condition ['type']。”,“。$ seat。”如   “。$ this-> condition ['type']。”_ s,a.company,a.time from   ".$this->TBLNAME." a \ n“;

对我来说,这看起来有点奇怪。

1 个答案:

答案 0 :(得分:4)

使用

select a.* from table a

或(没有别名)

select * from table
相关问题