Home >Backend Development >PHP Tutorial >php文件点击链接 从新调用数据有关问题

php文件点击链接 从新调用数据有关问题

WBOY
WBOYOriginal
2016-06-13 10:29:20767browse

php文件点击链接 从新调用数据问题
这是我的code  
on sale

 if ($s=="y"){
  $query = "select * from inventory where sale='y' order by id";
  }
else {
  $query = "select * from inventory order by id";
  }

为什么一直运行的事else?

------解决方案--------------------
$s是怎么获得的,是$s = $_GET['s'];吗
------解决方案--------------------
on sale

这是字符串啊,大哥,不是一个PHP定义语句啊。

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