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?

how to pass parameters to the query sql
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: how to pass parameters to the query sql
*
#55048
how to pass parameters to the query sql 9 Years, 5 Months ago Karma: 0
hello,
how to pass parameters to the query sql
you have a tutorial, an example
thank you
The administrator has disabled public write access.
 
#55049
Re:how to pass parameters to the query sql 9 Years, 5 Months ago Karma: 760
Hello,

It is possible to use request variables in "WHERE" clause of SQL query. For example if want to use "product_id" request variable in an SQL query, it will look like:

SELECT
id,
name
FROM
products
WHERE
id = {$REQUEST:product_id}

Regards,
ARI Soft
The administrator has disabled public write access.
 
#55072
Re:how to pass parameters to the query sql 9 Years, 5 Months ago Karma: 0
Hello,
so I can use the variables in my forms

such as $ _ GET ['period'] or $ _POST ['period'] you simply vriefier they are between two {}
--------------------------------------------------
SELECT
id
name
FROM
products
WHERE
period = '{$ _ GET [' period ']}'
--------------------------------------------------
or
--------------------------------------------------
SELECT
id
name
FROM
products
WHERE
period = {$ _ POST ['period']}
--------------------------------------------------
The administrator has disabled public write access.
 
#55075
Re:how to pass parameters to the query sql 9 Years, 5 Months ago Karma: 760
Hello,

It will look like:

Code:


SELECT
  id,
  name
FROM
  products
WHERE
  period = {$REQUEST:period}



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