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?

SQL Variable Query for Second Table
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: SQL Variable Query for Second Table
#47073
SQL Variable Query for Second Table 11 Years, 1 Month ago Karma: 0
Hi,

I have worked through many forum answers regarding SQL variables in a secondary table query but I am unable to get my code to work.

Please could you check it out for me?

The page is here: (removed)

The example tables and data I am using works if the WHERE statement in the second table is set to the following:

SELECT * FROM go_tbl_test_roles WHERE role_id=2

(or the 2 is exchanged for any valid value in the second table go_tbl_test_roles)

But the variable expression WHERE role_id={$REQUEST:employee_id} returns no table at all.


Regards
Last Edit: 2014/01/03 15:45 By kenton.hodges@gardiners.u.Reason: privacy
The administrator has disabled public write access.
 
#47076
Re:SQL Variable Query for Second Table 11 Years, 1 Month ago Karma: 762
Hello,

It seems you use "ARI Smart Content: DataTable Pack", but this topic is about "ARI Data Tables" extension (these are two different extensions). Currently "ARI Smart Content" doesn't support ability to use request variables in SQL query.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#47079
Re:SQL Variable Query for Second Table 11 Years, 1 Month ago Karma: 0
Hi,

Disappointing but if I purchase Ari Data Table extension, will I need to uninstall smart content or can they be used together?

Regards
The administrator has disabled public write access.
 
#47085
Re:SQL Variable Query for Second Table 11 Years, 1 Month ago Karma: 762
They can work together.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#72620
Re:SQL Variable Query for Second Table 2 Days, 9 Hours ago Karma: 0
Hi,
I am resurrecting this topic because whilst I have had success using the variables in the SQL Query for some years, I recently upgraded from Joomla 2.5.1 to version 5 and I can't get the same query to work.

The previous code was like this:

I create a link in the reference field (WW Ref) by adding this code in the format field for WW_Ref in the source table:

<a href="index.php?option=com_content&view=article&id=46&ww_ref={$value}">{$value}</a>

Then in the SQL Query for the table to filter, the code is:

SELECT ww_ref, service_id, service_name, DATE_FORMAT(visit_date,'%d/%m/%Y') AS visit_date, team_leader, comment,report
FROM go_tbl_ww_history
WHERE ww_ref={$REQUEST:ww_ref}

The page won't load with the following error:

If difficulties persist, please contact the website administrator and report the error below.

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3


Both tables show fine if a temporarily change the WHERE statement to a static:

WHERE ww_ref=10030

(Where 10030 is a value in WW_Ref
Last Edit: 2025/02/10 18:01 By kenton.hodges@gardiners.u.
The administrator has disabled public write access.
 
#72622
Re:SQL Variable Query for Second Table 1 Day, 13 Hours ago Karma: 762
Hello,

Could you contact us by email and provide a link to a page where the problem occurs and a temporary access to your J! backend so we can investigate the problem?

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