Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 23/11/2024 Black Friday 2024

    BIG SALE, 30% discount for all our extensions. Use BF24 coupon code. Hurry up the discount is valid till 3 December.

  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

[SOLVED] How to use LIKE in mySql?
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: [SOLVED] How to use LIKE in mySql?
#56284
[SOLVED] How to use LIKE in mySql? 9 Years ago Karma: 1
Hello

How to properly write LIKE syntax if I want to display all rows where mycolumn contains specific phrase?

I tried examples from here: stackoverflow.com/questions/2602252/mysql-query-string-contains

But module always throws error.

I guess that I need ARI specific escaping?

Thanks,
Regards
Krx
User Offline Click here to see the profile of this user
Last Edit: 2015/11/17 14:06 By Krx.
The administrator has disabled public write access.
 
#56285
Re:How to use LIKE in mySql? 9 Years ago Karma: 760
Hello,

What query do you use?

Regards,
ARI Soft
The administrator has disabled public write access.
 
#56286
Re:How to use LIKE in mySql? 9 Years ago Karma: 1
SELECT
id,
b_ref_id,
add_date,
last_modified_time_stamp
FROM
vit2_rpl_properties
WHERE
description_hr_hr
LIKE
%{$MsoNormalTable}%

"MsoNormalTable" is phrase which I'd like search for
Krx
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#56287
Re:How to use LIKE in mySql? 9 Years ago Karma: 760
This query is an incorrect. For example if you want to search 'Sample phrase' string, the query will look like:

Code:


SELECT 
  id,
  b_ref_id,
  add_date,
  last_modified_time_stamp
FROM 
  vit2_rpl_properties
WHERE
  description_hr_hr LIKE '%Sample phrase%'



Regards,
ARI Soft
The administrator has disabled public write access.
 
#56288
Re:How to use LIKE in mySql? 9 Years ago Karma: 1
Hi

This worked.
Thanks a lot

Best regards
Krx
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1