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


Recent Events
  • 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.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


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?

Search firstname column problem
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: Search firstname column problem
#50652
Search firstname column problem 9 Years, 8 Months ago Karma: 0
My issue is that I've got a query working but it isn't getting forms of the word. If I want to search by firstname and I put Sa and submit I don't get any results, if I put Sam in I get all the Sam results. How do I change this query so I get forms of the word? So if I type Sa I get the Sam results, the Samantha results, etc.

I've tried a few Like statements, but just can't get anything to work.

Here is my query tha word for the full name:
SELECT firstname AS FirstName, lastname AS LastName, cb_phone AS Phone, cb_address AS Address, cb_address2 AS Address2, cb_city AS City,cb_state AS State, cb_zip AS Zip
FROM joom_comprofiler
WHERE
({$REQUEST:start|empty:''} = '' OR firstname ={$REQUEST:start|empty:''})
AND
({$REQUEST:end|empty:''} = '' OR lastname = {$REQUEST:end|empty:''})
ORDER by firstname ASC

Thank you for any help!
I love Ari Data Tables! Thank you so much!!!
TK
The administrator has disabled public write access.
 
#50653
Re:Search firstname column problem 9 Years, 8 Months ago Karma: 747
Hello,

Where we can see the problem?

Regards,
ARI Soft
The administrator has disabled public write access.
 
#50656
Re:Search firstname column problem 9 Years, 8 Months ago Karma: 0
Send login info in private email. Let me know if you need more information.
The administrator has disabled public write access.
 
#50660
Re:Search firstname column problem 9 Years, 8 Months ago Karma: 747
Use LIKE operator instead of = in WHERE clause.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#50661
Re:Search firstname column problem 9 Years, 8 Months ago Karma: 0
I tried LIKE, but I don't get any search results. I've been testing AM since I know there is an AMY in the database.

Trying to search Like with submit field for first and/or last name.This is the query I have, but same results as when I use the = .

SELECT firstname AS FirstName, lastname AS LastName, cb_phone AS Phone, cb_address AS Address, cb_address2 AS Address2, cb_city AS City,cb_state AS State, cb_zip AS Zip
FROM joom_comprofiler
WHERE ({$REQUEST:start|empty:''} LIKE '' OR firstname LIKE{$REQUEST:start|empty:''})
AND
({$REQUEST:end|empty:''} LIKE '' OR lastname LIKE {$REQUEST:end|empty:''})
ORDER by firstname ASC
The administrator has disabled public write access.
 
#50662
Re:Search firstname column problem 9 Years, 8 Months ago Karma: 747
It is incorrect. The previous post contains the link to the page with description of LIKE operator.

Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 12