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?

How to user parameters in Select Clause?
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: How to user parameters in Select Clause?
#67952
How to user parameters in Select Clause? 2 Years, 9 Months ago Karma: 0
Hi,

I just started using ARI Tables and was told I could use parameters in the SELECT clause.

What I am trying to do is

SELECT * FROM {$UserLogin}

If possible.

Thanks

Edit: in debug mode it seems to think my username is the name on the account.

I need to be able to use the name used to log in in the query.

Edit2:

I have gotten it to grab the username but it for some reason is not loading the data despite the query looking to be correct.

(mysqli): SET NAMES 'UTF8'
Error (0):

(mysqli): SELECT * FROM 'shahij';
Error (1064): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''shahij'' at line 1
No data available.

Edit3:

I have pinpointed the issue to the pair of '' around shahij is there any way to remove it?
Last Edit: 2021/06/24 20:25 By JShahi.
The administrator has disabled public write access.
 
#67954
Re:How to user parameters in Select Clause? 2 Years, 9 Months ago Karma: 746
Hello,

Open <joomla_directory>/modules/mod_aridatatables/includes/kernel/DataTables/Models/class.DataTablesDataSqlModel.php file and replace the following code:

'UserLogin' => $db->Quote($user->get('username')),

with the following one:

'UserLogin' => $user->get('username'),

Regards,
ARI Soft
The administrator has disabled public write access.
 
#67955
Re:How to user parameters in Select Clause? 2 Years, 9 Months ago Karma: 0
Hi it works now!!!

Thank you so much!!!
The administrator has disabled public write access.
 
Go to topPage: 1