SQL搜索语法用于phpMyAdmin

huangapple go评论51阅读模式
英文:

SQL search syntax for phpMyAdmin

问题

我有WordPress的_posts表和一组特定的ID(例如100、102、137、141等),我应该在phpMyAdmin中使用什么SQL代码,使得ID 100的post_title始终与ID 100的组合,以此类推,对于ID 102、137等也是如此?

英文:

I have the WordPress _posts table and a specific list of IDs (e.g. 100, 102, 137, 141, ...), what SQL code should I use in phpMyAdmin to have the combination ID 100 + post_title always of ID 100 and so on for IDs 102, 137, etc?

答案1

得分: 2

尝试这个:

SELECT ID, post_title
FROM wp_posts
WHERE ID IN (100, 102, 137, 141);


这段代码将从wp_posts表中仅选择具有指定ID(100、102、137、141)的帖子。

<details>
<summary>英文:</summary>

Try this:

SELECT ID, post_title
FROM wp_posts
WHERE ID IN (100, 102, 137, 141)
END;


This code will select only the posts with the specified IDs (100, 102, 137, 141) from the wp_posts table.

</details>



huangapple
  • 本文由 发表于 2023年3月9日 16:59:31
  • 转载请务必保留本文链接:https://go.coder-hub.com/75682354.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定