SELECT * FROM Header WHERE (userID LIKE [%'%])
%s is a placeholder used in functions like sprintf. Check the manual for other possible placeholders. $sql = sprintf($sql, "Test"); This would replace %s with the string "Test".
SQL Server CHARINDEX() Function The CHARINDEX() function searches for a substring in a string, and returns the position. If the substring is not found, this function returns 0. Note: This function performs a case-insensitive search.
SQL Pattern: How can I count the number of comma separated values in a string? Basically, you replace all occurrences of , with an empty string "" , then subtract its LENGTH from the LENGTH of the unadulterated string, which gives you the number of , characters.
Double them to escape;
SELECT * FROM Header WHERE userID LIKE '%''%'
SELECT * FROM Header WHERE (userID LIKE '%''%')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With