简体   繁体   中英

Return only field in query

I have the following query which relates to my WP site.

SELECT * FROM `wp2d_postmeta` WHERE `post_id` = 7383 and `meta_key` = 'product_guidelines'

Which returns the following data:

查询结果

How can I only return the metal_value field?

Change your query to select only that column. Not all columns (*):

SELECT meta_value FROM wp2d_postmeta WHERE post_id = 7383 and meta_key = 'product_guidelines'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM