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?

Filtering data by passing a parameter in the URL
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Filtering data by passing a parameter in the URL
#49393
Filtering data by passing a parameter in the URL 10 Years, 6 Months ago Karma: 0
Need some help with filtering data by passing a parameter in the URL - is it possible?
For example - filtering books owned by a particular category -

Table Name: books; Fields are id, book_name, book_category, book_pubdate
and book category=fiction, non-fiction, etc.

Need help
(i) with my query
SELECT * FROM books WHERE book_category= [HELP NEEDED HERE](syntax to read parameter passed in the URL)

(ii) with how I set up the URL
www.abc.com/..... [HELP NEEDED HERE](syntax to pass parameter)

I have a similar question on ARI Smart Content, but will post on the appropriate forum after I am able to figure this out with your help. Thanks.
Sudhi
The administrator has disabled public write access.
 
#49394
Re:Filtering data by passing a parameter in the URL 10 Years, 6 Months ago Karma: 760
Hello,

For example if you send a category in "cat" request parameter, use the following SQL query:

Code:


SELECT
 *
FROM
 books
WHERE
 book_category = {$REQUEST:cat|empty:''}



Regards,
ARI Soft
The administrator has disabled public write access.
 
#49395
Re:Filtering data by passing a parameter in the URL 10 Years, 6 Months ago Karma: 0
Thanks!

and what would be the syntax for the URL would be if I am passing cat=fiction

example
www.abc.net/index.php/explore/layouts/books/???
The administrator has disabled public write access.
 
#49396
Re:Filtering data by passing a parameter in the URL 10 Years, 6 Months ago Karma: 760
Code:


www.abc.net/index.php/explore/layouts/books/?cat=fiction



Regards,
ARI Soft
The administrator has disabled public write access.
 
#49399
Re:Filtering data by passing a parameter in the URL 10 Years, 6 Months ago Karma: 0
Super. Works fine. Thanks much. And now I will have to bug you a bit on the other forum - ARI Smart Content on the same issue. Your help much appreciated.
Cheers!
The administrator has disabled public write access.
 
#49400
Re:Filtering data by passing a parameter in the URL 10 Years, 6 Months ago Karma: 760
Currently "ARI Smart Content" doesn't support this feature.

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