【发布时间】:2011-05-06 02:55:29
【问题描述】:
我在 PostgreSQL 中有这张表:
appid | appname | apptype | creationtime | createdby | display
-------+-------------------------------------+---------+--------------+-----------+---------
0 | Custom | -1 | | | t
1000 | Performance/Resource | -2 | | | t
2000 | PING | 0 | | | t
2001 | HTTP | 0 | | | t
2002 | HTTPS | 0 | | | t
2003 | FTP | 0 | | | t
2004 | LDAP | 0 | | | t
2005 | IMAP | 0 | | | t
2006 | POP | 0 | | | t
2007 | SMTP | 0 | | | t
2008 | DNS | 0 | | | t
2009 | NFS | 0 | | | t
2010 | NTP | 0 | | | t
2011 | SSH | 0 | | | t
2012 | TCP | 0 | | | t
2013 | TELNET | 0 | | | t
3000 | Generic Mail (RTT) | 3 | | | t
3001 | Apache Tomcat | 2 | | | t
3002 | JBoss | 2 | | | t
3003 | MySQL | 1 | | | t
3004 | WebSphere | 2 | | | t
4000 | Microsoft Exchange Server 2003 | 3 | | | t
4001 | Exchange Server 2007 /2010 | 3 | | | t
4003 | Microsoft SQL Server 2008 | 1 | | | t
4004 | Microsoft ISA Server 2006 | 99 | | | t
4005 | Microsoft IIS | 4 | | | t
3005 | DB2 | 1 | | | t
3006 | Apache HTTP Server | 4 | | | t
3007 | Oracle | 1 | | | t
3008 | PostgreSQL | 1 | | | t
3009 | WebLogic | 2 | | | t
3010 | Adobe ColdFusion | 2 | | | t
3011 | Sybase | 1 | | | t
4007 | Microsoft SQL Server 2005 (EXPRESS) | 1 | | | t
4008 | Microsoft Team Foundation Server | 2 | | | t
4009 | Microsoft .NET | 99 | | | t
3012 | Apache Tomcat | 2 | | | f
当此表显示在下拉列表中时,Apache Tomcat 重复 2 次。如何禁用最后一行 3012?我有一个删除它的选项,但这个表在几个地方使用,所以我不想删除它。
【问题讨论】:
-
这里的信息太少了。它可以像“WHERE appid!=3012”一样简单,但谁知道呢?
-
@ceejayoz:当我使用它时,我的整个下拉列表显示为空
-
我已经在使用这个... $query = "select appid,appname from stat_applications where appid!=0 and appid!=1000";现在我可以把这个放在哪里
-
@ceejayoz: 解决这个问题后也把你的评论放在 ans 我想选择你的 ans 为最佳
标签: php sql postgresql