小编Ran*_*rin的帖子

SQLite 在 WHERE LIKE 中的多个条件

无论如何在不使用 OR 的情况下在 WHERE x LIKE %x% 语句中有多个条件?

基本上我希望能够选择一些东西,其中 column1 LIKE %something% AND column2 LIKE %check1% OR %check2% OR %check3%

但是,使用 OR 删除了我之前对 column1 的第一次检查,但我需要将其保留在原位

这是我目前正在使用的......但我想知道是否有更好的方法来做到这一点,所以我不必继续重复 column1

SELECT id FROM test WHERE 
column1 LIKE '%bob%' AND column2 LIKE '%something%' 
OR column1 LIKE '%bob%' AND column2 LIKE '%somethingdifferent%' 
OR column1 LIKE '%bob%' AND column2 LIKE '%somethingdifferent2%'
Run Code Online (Sandbox Code Playgroud)

基本上..现在我不得不重复

column1 LIKE %bob%' AND .........
Run Code Online (Sandbox Code Playgroud)

只是想知道是否有更好的方法来实现这一目标?

python database sqlite

2
推荐指数
1
解决办法
1374
查看次数

Bootstrap 4导航栏固定在内容上方

我正在使用bootstrap4固定式导航栏,该导航栏在普通浏览器中可以正常运行。

但是,当我在移动设备(使用chrome dev选项的Galaxy S5)上进行测试时,内容从导航栏后面开始,我尝试在CSS中进行一些填充,但似乎无法使其正常工作。

下面是HTML和CSS的jsfiddle,页面内容从固定顶部的导航栏后面开始。

https://jsfiddle.net/8kefh4u7/6/

这也是我的CSS

html,
body {
  height: 100%;
}

body {
  display: -ms-flexbox;
  display: -webkit-box;
  display: flex;
  -ms-flex-align: center;
  -ms-flex-pack: center;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: center;
  justify-content: center;
  padding-top: 40px;
  padding-bottom: 40px;
  background-color: #f5f5f5;
}

.epg-container {
  position: relative;
  width: 100%;
  max-width: 1500px;
  overflow: hidden;
  display: block;
  margin: 0 auto;
  background-color: black;
}
.epg-container ul.listings-grid {
  list-style-type: none;
  padding: 0;
  margin: 0;
  white-space: nowrap;
  background-color: #262626;
}
.epg-container ul.listings-grid li {
  font-size: 20px;
  text-align: left; …
Run Code Online (Sandbox Code Playgroud)

html css php navbar bootstrap-4

0
推荐指数
3
解决办法
2164
查看次数

标签 统计

bootstrap-4 ×1

css ×1

database ×1

html ×1

navbar ×1

php ×1

python ×1

sqlite ×1