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?

PHP variables
(1 viewing) (1) Guest
Go to bottomPage: 1234567
TOPIC: PHP variables
*
#26384
Re:PHP variables 12 Years, 3 Months ago Karma: 5
is it possible to have a column displayed represented by a variable dependent on an 'if' clause
Code:


function prepareQuery($query)
 {
 
$db->setquery("SELECT column_x FROM table_x");
$VARIABLE = $db->loadresult();


if ($VARIABLE > 5){
$VARIABLE = "YES";
}
else {
$VARIABLE = "NO";
}



I would then define as usual


Code:

$params = array(

 'VARIABLE' => $VARIABLE
 );



Then finally include this variable in a select statement in ARI data tables

Code:

SELECT column_x,{$VARIABLE} AS STATUS
FROM table_x 



I understand that $VARIBALE is an array but I would like the Select statement to loop through each value in column_x and display the resulting {$VARIABLE} dependent on the value of column_x


thanks

trevor
Last Edit: 2012/03/17 13:08 By trevor_stp.
The administrator has disabled public write access.
 
#26388
Re:PHP variables 12 Years, 3 Months ago Karma: 748
Hello,

The extension doesn't support this ability. You can modify it for your needs.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#38511
Re:PHP variables 11 Years, 3 Months ago Karma: 5
Hi,

is there a way to allow for server side pagination while including custom php variables?

For example, when I include the following in the SQL query

Code:

FROM table_{$customvariable}


the server pagination will not produce any results.

If I include

Code:

FROM table_4


where '4' is the same value as the $customvariable the server side pagination works fine.

Thanks,

Trevor
The administrator has disabled public write access.
 
#38513
Re:PHP variables 11 Years, 3 Months ago Karma: 748
Hello,

The extension doesn't support the described ability.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#38679
Re:PHP variables 11 Years, 3 Months ago Karma: 5
If possible, can you point me in the correct direction as to what file to modify to add this functionality.

Most of my table are over 1000 rows and all are generated using an PHP variable in the table name.

Server side pagination is a great addition to the product and I would love to use it to its full capabilities.

Thanks
The administrator has disabled public write access.
 
#38680
Re:PHP variables 11 Years, 3 Months ago Karma: 748
See <joomla_directory>\modules\mod_aridatatables\includes\kernel\DataTables\Models\class.DataTablesDataSqlModel.php file.

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