LMSouq
database Open

MySQL query String contains

AR
arik
1 month ago
3 views
Problem Description
I've been trying to figure out how I can make a query with MySQL that checks if the value (string `$haystack` ) in a certain column contains certain data (string `$needle`), like this: SELECT * FROM `table` WHERE `column`.contains('textABC') In PHP, the function is called `substr`, so maybe: WHERE substr(`column`, 'textABC')=1

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base