{"id":3747,"date":"2024-09-02T13:14:19","date_gmt":"2024-09-02T05:14:19","guid":{"rendered":"https:\/\/five.co\/?p=3747"},"modified":"2026-05-04T15:08:09","modified_gmt":"2026-05-04T07:08:09","slug":"mysql-find-in-set","status":"publish","type":"post","link":"https:\/\/preview-php85.dzine.org\/five\/blog\/mysql-find-in-set\/","title":{"rendered":"MySQL FIND_IN_SET(): A Comprehensive Guide"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Breakdown of MySQL FIND_IN_SET<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">MySQL\u2019s <code>FIND_IN_SET()<\/code> function is a useful tool for searching strings within a comma-separated list. Whether you\u2019re dealing with tags, categories, or any other scenario where data is stored in a comma-separated format, <code>FIND_IN_SET()<\/code> can help you efficiently locate specific values within your data.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<div class=\"root-eb-toc-esmek wp-block-essential-blocks-table-of-contents\"><div class=\"eb-parent-wrapper eb-parent-eb-toc-esmek \"><div class=\"eb-toc-container eb-toc-esmek  eb-toc-is-not-sticky eb-toc-not-collapsible eb-toc-initially-not-collapsed eb-toc-scrollToTop style-1 list-style-none\" data-scroll-top=\"false\" data-scroll-top-icon=\"fas fa-angle-up\" data-collapsible=\"false\" data-sticky-hide-mobile=\"false\" data-sticky=\"false\" data-scroll-target=\"scroll_to_toc\" data-copy-link=\"false\" data-editor-type=\"\" data-hide-desktop=\"false\" data-hide-tab=\"false\" data-hide-mobile=\"false\" data-itemcollapsed=\"false\" data-highlight-scroll=\"false\"><div class=\"eb-toc-header\"><h2 class=\"eb-toc-title\">Table of Contents<\/h2><\/div><div class=\"eb-toc-wrapper \" data-headers=\"[{&quot;level&quot;:2,&quot;content&quot;:&quot;Breakdown of MySQL FIND_IN_SET&quot;,&quot;text&quot;:&quot;Breakdown of MySQL FIND_IN_SET&quot;,&quot;link&quot;:&quot;breakdown-of-mysql-find_in_set&quot;},{&quot;level&quot;:2,&quot;content&quot;:&quot;What is FIND_IN_SET()?&quot;,&quot;text&quot;:&quot;What is FIND_IN_SET()?&quot;,&quot;link&quot;:&quot;what-is-find_in_set&quot;},{&quot;level&quot;:3,&quot;content&quot;:&quot;Syntax&quot;,&quot;text&quot;:&quot;Syntax&quot;,&quot;link&quot;:&quot;syntax&quot;},{&quot;level&quot;:3,&quot;content&quot;:&quot;Example&quot;,&quot;text&quot;:&quot;Example&quot;,&quot;link&quot;:&quot;example&quot;},{&quot;level&quot;:2,&quot;content&quot;:&quot;Practical Uses of FIND_IN_SET()&quot;,&quot;text&quot;:&quot;Practical Uses of FIND_IN_SET()&quot;,&quot;link&quot;:&quot;practical-uses-of-find_in_set&quot;},{&quot;level&quot;:3,&quot;content&quot;:&quot;1. Filtering Rows Based on Comma-Separated Values&quot;,&quot;text&quot;:&quot;1. Filtering Rows Based on Comma-Separated Values&quot;,&quot;link&quot;:&quot;1-filtering-rows-based-on-comma-separated-values&quot;},{&quot;level&quot;:3,&quot;content&quot;:&quot;2. Ordering Results Based on a Specific Value&quot;,&quot;text&quot;:&quot;2. Ordering Results Based on a Specific Value&quot;,&quot;link&quot;:&quot;2-ordering-results-based-on-a-specific-value&quot;},{&quot;level&quot;:3,&quot;content&quot;:&quot;3. Joining Tables Based on Comma-Separated Values&quot;,&quot;text&quot;:&quot;3. Joining Tables Based on Comma-Separated Values&quot;,&quot;link&quot;:&quot;3-joining-tables-based-on-comma-separated-values&quot;},{&quot;level&quot;:2,&quot;content&quot;:&quot;Considerations&quot;,&quot;text&quot;:&quot;Considerations&quot;,&quot;link&quot;:&quot;considerations&quot;},{&quot;level&quot;:3,&quot;content&quot;:&quot;Tips for Optimization&quot;,&quot;text&quot;:&quot;Tips for Optimization&quot;,&quot;link&quot;:&quot;tips-for-optimization&quot;},{&quot;level&quot;:2,&quot;content&quot;:&quot;FIND_IN_SET() is Case-Sensitive&quot;,&quot;text&quot;:&quot;FIND_IN_SET() is Case-Sensitive&quot;,&quot;link&quot;:&quot;find_in_set-is-case-sensitive&quot;},{&quot;level&quot;:3,&quot;content&quot;:&quot;1. Case Sensitivity&quot;,&quot;text&quot;:&quot;1. Case Sensitivity&quot;,&quot;link&quot;:&quot;1-case-sensitivity&quot;},{&quot;level&quot;:3,&quot;content&quot;:&quot;2. Dealing with NULL Values&quot;,&quot;text&quot;:&quot;2. Dealing with NULL Values&quot;,&quot;link&quot;:&quot;2-dealing-with-null-values&quot;},{&quot;level&quot;:3,&quot;content&quot;:&quot;3. Empty Strings&quot;,&quot;text&quot;:&quot;3. Empty Strings&quot;,&quot;link&quot;:&quot;3-empty-strings&quot;},{&quot;level&quot;:2,&quot;content&quot;:&quot;Alternatives to FIND_IN_SET()&quot;,&quot;text&quot;:&quot;Alternatives to FIND_IN_SET()&quot;,&quot;link&quot;:&quot;alternatives-to-find_in_set&quot;},{&quot;level&quot;:2,&quot;content&quot;:&quot;Conclusion&quot;,&quot;text&quot;:&quot;Conclusion&quot;,&quot;link&quot;:&quot;conclusion&quot;},{&quot;level&quot;:2,&quot;content&quot;:&quot;FAQs&quot;,&quot;text&quot;:&quot;FAQs&quot;,&quot;link&quot;:&quot;faqs&quot;}]\" data-visible=\"[true,true,true,true,true,true]\" data-delete-headers=\"[{&quot;label&quot;:&quot;Breakdown of MySQL FIND_IN_SET&quot;,&quot;value&quot;:&quot;breakdown-of-mysql-find_in_set&quot;,&quot;isDelete&quot;:false},{&quot;label&quot;:&quot;What is FIND_IN_SET()?&quot;,&quot;value&quot;:&quot;what-is-find_in_set&quot;,&quot;isDelete&quot;:false},{&quot;label&quot;:&quot;Syntax&quot;,&quot;value&quot;:&quot;syntax&quot;,&quot;isDelete&quot;:true},{&quot;label&quot;:&quot;Example&quot;,&quot;value&quot;:&quot;example&quot;,&quot;isDelete&quot;:true},{&quot;label&quot;:&quot;Practical Uses of FIND_IN_SET()&quot;,&quot;value&quot;:&quot;practical-uses-of-find_in_set&quot;,&quot;isDelete&quot;:false},{&quot;label&quot;:&quot;1. Filtering Rows Based on Comma-Separated Values&quot;,&quot;value&quot;:&quot;1-filtering-rows-based-on-comma-separated-values&quot;,&quot;isDelete&quot;:true},{&quot;label&quot;:&quot;2. Ordering Results Based on a Specific Value&quot;,&quot;value&quot;:&quot;2-ordering-results-based-on-a-specific-value&quot;,&quot;isDelete&quot;:true},{&quot;label&quot;:&quot;3. Joining Tables Based on Comma-Separated Values&quot;,&quot;value&quot;:&quot;3-joining-tables-based-on-comma-separated-values&quot;,&quot;isDelete&quot;:true},{&quot;label&quot;:&quot;Considerations&quot;,&quot;value&quot;:&quot;considerations&quot;,&quot;isDelete&quot;:false},{&quot;label&quot;:&quot;Tips for Optimization&quot;,&quot;value&quot;:&quot;tips-for-optimization&quot;,&quot;isDelete&quot;:true},{&quot;label&quot;:&quot;FIND_IN_SET() is Case-Sensitive&quot;,&quot;value&quot;:&quot;find_in_set-is-case-sensitive&quot;,&quot;isDelete&quot;:false},{&quot;label&quot;:&quot;1. Case Sensitivity&quot;,&quot;value&quot;:&quot;1-case-sensitivity&quot;,&quot;isDelete&quot;:true},{&quot;label&quot;:&quot;2. Dealing with NULL Values&quot;,&quot;value&quot;:&quot;2-dealing-with-null-values&quot;,&quot;isDelete&quot;:true},{&quot;label&quot;:&quot;3. Empty Strings&quot;,&quot;value&quot;:&quot;3-empty-strings&quot;,&quot;isDelete&quot;:true},{&quot;label&quot;:&quot;Alternatives to FIND_IN_SET()&quot;,&quot;value&quot;:&quot;alternatives-to-find_in_set&quot;,&quot;isDelete&quot;:false},{&quot;label&quot;:&quot;Conclusion&quot;,&quot;value&quot;:&quot;conclusion&quot;,&quot;isDelete&quot;:false},{&quot;label&quot;:&quot;FAQs&quot;,&quot;value&quot;:&quot;faqs&quot;,&quot;isDelete&quot;:false}]\" data-smooth=\"true\" data-top-offset=\"\"><div class=\"eb-toc__list-wrap\"><ul class=\"eb-toc__list\"><li><a href=\"#breakdown-of-mysql-find_in_set\">Breakdown of MySQL FIND_IN_SET<\/a><li><a href=\"#what-is-find_in_set\">What is FIND_IN_SET()?<\/a><li><a href=\"#practical-uses-of-find_in_set\">Practical Uses of FIND_IN_SET()<\/a><li><a href=\"#considerations\">Considerations<\/a><li><a href=\"#find_in_set-is-case-sensitive\">FIND_IN_SET() is Case-Sensitive<\/a><li><a href=\"#alternatives-to-find_in_set\">Alternatives to FIND_IN_SET()<\/a><li><a href=\"#conclusion\">Conclusion<\/a><li><a href=\"#faqs\">FAQs<\/a><\/ul><\/div><\/div><\/div><\/div><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">What is <code>FIND_IN_SET()<\/code>?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>FIND_IN_SET()<\/code> is a MySQL function that returns the position of a string within a comma-separated list of strings. If the string is found, the function returns the position (starting from 1). If the string is not found, it returns 0. If any input argument is NULL, the function returns NULL.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Syntax<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#abb2bf;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#282c34\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#abb2bf;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>FIND_IN_SET(string_to_find, string_list)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki one-dark-pro\" style=\"background-color: #282c34\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #ABB2BF\">FIND_IN_SET(string_to_find, string_list)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>string_to_find<\/code><\/strong>: The string you want to search for.<\/li>\n\n\n\n<li><strong><code>string_list<\/code><\/strong>: The comma-separated list in which you want to search.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Consider the following example:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#abb2bf;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#282c34\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#abb2bf;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>SELECT FIND_IN_SET('apple', 'banana,orange,apple,grape') AS position;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki one-dark-pro\" style=\"background-color: #282c34\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #C678DD\">SELECT<\/span><span style=\"color: #ABB2BF\"> FIND_IN_SET(<\/span><span style=\"color: #98C379\">&#39;apple&#39;<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #98C379\">&#39;banana,orange,apple,grape&#39;<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #C678DD\">AS<\/span><span style=\"color: #ABB2BF\"> position;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">In this case, <code>FIND_IN_SET('apple', 'banana,orange,apple,grape')<\/code> will return <code>3<\/code> because &#8216;apple&#8217; is the third item in the list.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Practical Uses of <code>FIND_IN_SET()<\/code><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Filtering Rows Based on Comma-Separated Values<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">One of the most common use cases for <code>FIND_IN_SET()<\/code> is filtering rows in a database table where a column contains comma-separated values. For instance, suppose you have a table <code>products<\/code> with a <code>tags<\/code> column that stores tags as comma-separated values:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#abb2bf;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#282c34\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#abb2bf;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>SELECT * FROM products WHERE FIND_IN_SET('electronics', tags);<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki one-dark-pro\" style=\"background-color: #282c34\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #C678DD\">SELECT<\/span><span style=\"color: #ABB2BF\"> * <\/span><span style=\"color: #C678DD\">FROM<\/span><span style=\"color: #ABB2BF\"> products <\/span><span style=\"color: #C678DD\">WHERE<\/span><span style=\"color: #ABB2BF\"> FIND_IN_SET(<\/span><span style=\"color: #98C379\">&#39;electronics&#39;<\/span><span style=\"color: #ABB2BF\">, tags);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:21px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">This query will return all products tagged with &#8216;electronics&#8217;.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Ordering Results Based on a Specific Value<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can also use <code>FIND_IN_SET()<\/code> to order your results based on the position of a value within a comma-separated list. For example:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#abb2bf;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#282c34\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#abb2bf;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>SELECT * FROM products ORDER BY FIND_IN_SET('electronics', tags) DESC;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki one-dark-pro\" style=\"background-color: #282c34\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #C678DD\">SELECT<\/span><span style=\"color: #ABB2BF\"> * <\/span><span style=\"color: #C678DD\">FROM<\/span><span style=\"color: #ABB2BF\"> products <\/span><span style=\"color: #C678DD\">ORDER BY<\/span><span style=\"color: #ABB2BF\"> FIND_IN_SET(<\/span><span style=\"color: #98C379\">&#39;electronics&#39;<\/span><span style=\"color: #ABB2BF\">, tags) <\/span><span style=\"color: #C678DD\">DESC<\/span><span style=\"color: #ABB2BF\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:21px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">This query will prioritize products that have &#8216;electronics&#8217; as a tag.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Joining Tables Based on Comma-Separated Values<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Although not as efficient as other methods, <code>FIND_IN_SET()<\/code> can be used in join conditions when dealing with comma-separated lists:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#abb2bf;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#282c34\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#abb2bf;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>SELECT p.*, c.*\nFROM products p\nJOIN categories c ON FIND_IN_SET(c.id, p.category_ids);<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki one-dark-pro\" style=\"background-color: #282c34\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #C678DD\">SELECT<\/span><span style=\"color: #ABB2BF\"> p.*, c.*<\/span><\/span>\n<span class=\"line\"><span style=\"color: #C678DD\">FROM<\/span><span style=\"color: #ABB2BF\"> products p<\/span><\/span>\n<span class=\"line\"><span style=\"color: #C678DD\">JOIN<\/span><span style=\"color: #ABB2BF\"> categories c <\/span><span style=\"color: #C678DD\">ON<\/span><span style=\"color: #ABB2BF\"> FIND_IN_SET(<\/span><span style=\"color: #D19A66\">c<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #D19A66\">id<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">p<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #D19A66\">category_ids<\/span><span style=\"color: #ABB2BF\">);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:21px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">In this example, the <code>category_ids<\/code> column in the <code>products<\/code> table contains a comma-separated list of category IDs.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\"><strong style=\"background-color: rgb(69, 136, 216); color: rgb(241, 235, 218); font-size: calc(12px + 0.390625vw); font-weight: bold;\">FIND IN SET with a Rapid Database Builder<\/strong><\/mark><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While understanding SQL and executing efficient queries isn&#8217;t too difficult, working with complex string operations in a MySQL database often requires significant SQL knowledge. This is where rapid database builders like Five come into play.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Five provides a MySQL database for your application and generates an automatic UI<\/strong>, making it easier to interact with your data, including scenarios where you need to search within comma-separated lists using functions like <code>FIND_IN_SET()<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With Five, you can create interactive forms, dynamic charts, and comprehensive PDF reports that are automatically generated based on your database schema. These features are particularly useful when you need to visualize and report on data stored in formats that require <code>FIND_IN_SET()<\/code> for querying.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Five also enables you to write custom JavaScript and TypeScript functions, providing additional flexibility to implement complex business logic.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once your application is ready, Five makes deployment easy with just a few clicks, allowing you to deploy your MySQL-based application to a secure, scalable cloud infrastructure. This lets you focus on development while Five handles the intricacies of cloud deployment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you\u2019re serious about using MySQL and efficiently managing your data, give Five a try.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/preview-php85.dzine.org\/five\/get-started\/\">Sign up for free access to Five\u2019s online development environment and start building your MySQL web application today.<\/a><\/p>\n\n\n\n<div style=\"background-color: #001524;\"><hr style=\"height: 5px;\" \/>\n<pre style=\"text-align: center; overflow: hidden; white-space: pre-line;\"><span style=\"color: #f1ebda; background-color: #4588d8; font-size: calc(18px + 0.390625vw);\"><strong>Build Your Database In 3 Steps<\/strong><br \/><span style=\"font-size: 14pt;\">Start Developing Today<\/span><\/span><\/pre>\n<p style=\"text-align: center;\"><a href=\"https:\/\/preview-php85.dzine.org\/five\/get-started\" target=\"_blank\" rel=\"noopener\" data-wplink-edit=\"true\"><button style=\"background-color: #f8b92b; border: none; color: black; padding: 20px; text-align: center; text-decoration: none; display: inline-block; font-size: 18px; cursor: pointer; margin: 4px 2px; border-radius: 5px;\"><strong>Get Instant Access<\/strong><\/button><br \/><\/a><\/p>\n<hr style=\"height: 5px;\" \/><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Considerations<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">While <code>FIND_IN_SET()<\/code> is convenient, it&#8217;s important to note that it can be less efficient than other querying methods, especially with large datasets. This inefficiency arises because <code>FIND_IN_SET()<\/code> does not use indexes, which means it has to perform a full table scan to find matches.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Tips for Optimization<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Avoid Using Comma-Separated Values:<\/strong> If possible, normalize your database structure instead of using comma-separated values. This involves creating a separate table for the values and using joins to retrieve the data.<\/li>\n\n\n\n<li><strong>Limit the Use of <code>FIND_IN_SET()<\/code>:<\/strong> Use <code>FIND_IN_SET()<\/code> for small datasets or infrequent queries. For larger datasets, consider redesigning your database to avoid the need for such functions.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><code>FIND_IN_SET()<\/code> is Case-Sensitive<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Case Sensitivity<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><code>FIND_IN_SET()<\/code> is case-sensitive. If you need a case-insensitive search, you can use the <code>LOWER()<\/code> or <code>UPPER()<\/code> functions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT FIND_IN_SET(LOWER('Apple'), LOWER('banana,orange,apple,grape')) AS position;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. Dealing with NULL Values<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If either the <code>string_to_find<\/code> or <code>string_list<\/code> is NULL, <code>FIND_IN_SET()<\/code> will return NULL. Always ensure that your data is properly validated to avoid unexpected results.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Empty Strings<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><code>FIND_IN_SET('','string_list')<\/code> will return 0 because an empty string is not considered a valid value in the list.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Alternatives to <code>FIND_IN_SET()<\/code><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In cases where performance is critical, and your dataset is large, consider using alternatives to <code>FIND_IN_SET()<\/code>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Normalization<\/strong>: As mentioned, normalize your data by breaking down comma-separated values into a separate table.<\/li>\n\n\n\n<li><strong>LIKE Operator<\/strong>: Although not a perfect substitute, the <code>LIKE<\/code> operator can sometimes be used depending on the specific requirements:<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#abb2bf;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#282c34\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#abb2bf;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>  SELECT * FROM products WHERE tags LIKE '%electronics%';<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki one-dark-pro\" style=\"background-color: #282c34\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">SELECT<\/span><span style=\"color: #ABB2BF\"> * <\/span><span style=\"color: #C678DD\">FROM<\/span><span style=\"color: #ABB2BF\"> products <\/span><span style=\"color: #C678DD\">WHERE<\/span><span style=\"color: #ABB2BF\"> tags <\/span><span style=\"color: #C678DD\">LIKE<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">&#39;%electronics%&#39;<\/span><span style=\"color: #ABB2BF\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Note that this approach may lead to false positives (e.g., matching &#8216;electronics-accessories&#8217; when you&#8217;re looking for &#8216;electronics&#8217;).<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>FIND_IN_SET()<\/code> function in MySQL is a tool for searching within comma-separated lists. While it offers convenience, especially in legacy systems where comma-separated values are common, it&#8217;s essential to use it judiciously due to potential performance drawbacks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/preview-php85.dzine.org\/five\/get-started\/\">Sign up for free access to Five\u2019s online development environment and start building your MySQL web application today.<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">FAQs<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q1: Can <code>FIND_IN_SET()<\/code> handle numbers as well as strings?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Yes, <code>FIND_IN_SET()<\/code> can handle both numbers and strings, as long as they are in the correct format within the comma-separated list.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q2: Is there a limit to the number of items in the comma-separated list?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While MySQL does not impose a strict limit, performance can degrade with very large lists. It&#8217;s better to avoid extremely long lists and consider normalization instead.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q3: How do I make <code>FIND_IN_SET()<\/code> case-insensitive?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can use the <code>LOWER()<\/code> or <code>UPPER()<\/code> functions to ensure case-insensitivity:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT FIND_IN_SET(LOWER('item'), LOWER('list,item,values')) AS position;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q4: Can I use <code>FIND_IN_SET()<\/code> in an <code>UPDATE<\/code> statement?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Yes, <code>FIND_IN_SET()<\/code> can be used in <code>UPDATE<\/code> statements to conditionally update rows based on the presence of a value in a comma-separated list.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q5: What are the alternatives to <code>FIND_IN_SET()<\/code> for better performance?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Consider normalizing your data into separate tables or using the <code>LIKE<\/code> operator for partial matches, keeping in mind the potential for false positives.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Breakdown of MySQL FIND_IN_SET MySQL\u2019s FIND_IN_SET() function is a useful tool for searching strings within a comma-separated list. Whether you\u2019re dealing with tags, categories, or any other scenario where data is stored in a comma-separated format, FIND_IN_SET() can help you efficiently locate specific values within your data. What is FIND_IN_SET()? FIND_IN_SET() is a MySQL function [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":3748,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_eb_attr":"","_uag_custom_page_level_css":"","footnotes":""},"categories":[21],"tags":[],"class_list":["post-3747","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"acf":[],"uagb_featured_image_src":{"full":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/Five.Co-MySQL-FIND_IN_SET-A-Comprehensive-Guide.png",1280,720,false],"thumbnail":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/Five.Co-MySQL-FIND_IN_SET-A-Comprehensive-Guide-150x150.png",150,150,true],"medium":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/Five.Co-MySQL-FIND_IN_SET-A-Comprehensive-Guide-300x169.png",300,169,true],"medium_large":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/Five.Co-MySQL-FIND_IN_SET-A-Comprehensive-Guide-768x432.png",768,432,true],"large":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/Five.Co-MySQL-FIND_IN_SET-A-Comprehensive-Guide-1024x576.png",1024,576,true],"1536x1536":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/Five.Co-MySQL-FIND_IN_SET-A-Comprehensive-Guide.png",1280,720,false],"2048x2048":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/Five.Co-MySQL-FIND_IN_SET-A-Comprehensive-Guide.png",1280,720,false]},"uagb_author_info":{"display_name":"Ryan Forrester","author_link":"https:\/\/preview-php85.dzine.org\/five\/author\/f1v5_ed9_au\/"},"uagb_comment_info":0,"uagb_excerpt":"Breakdown of MySQL FIND_IN_SET MySQL\u2019s FIND_IN_SET() function is a useful tool for searching strings within a comma-separated list. Whether you\u2019re dealing with tags, categories, or any other scenario where data is stored in a comma-separated format, FIND_IN_SET() can help you efficiently locate specific values within your data. What is FIND_IN_SET()? FIND_IN_SET() is a MySQL function&hellip;","_links":{"self":[{"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/posts\/3747","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/comments?post=3747"}],"version-history":[{"count":1,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/posts\/3747\/revisions"}],"predecessor-version":[{"id":17806,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/posts\/3747\/revisions\/17806"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/media\/3748"}],"wp:attachment":[{"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/media?parent=3747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/categories?post=3747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/tags?post=3747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}