Hello,
I created a custom table called reports, which then runs an sql query.
But I do not want to put several queries on the same page, but rather, when "reports" is opened, more buttons appear, one for each query. How could that be done?
Thanks
Thomas
Put a custom table into a custom table
Re: Put a custom table into a custom table
hello , it will be like form
when you select button will forward value one value will be post
then use IF statement
this is fast example
please check
when you select button will forward value one value will be post
then use IF statement
this is fast example
Code: Select all
<?php
define('PREPEND_PATH', '../');
$report_dir = dirname(__FILE__);
include("$report_dir/../lib.php");
include_once("$report_dir/../header.php");
?>
<form id="Form" name="Form" autocomplete="off" action='' method="POST">
<input type="submit" name="query" id="query1" value="query1" class="btn btn-primary btn-lg" role="button">
<input type="submit" name="query" id="query2" value="query2" class="btn btn-info btn-lg" role="button">
</form>
<?php
//print_r ($_POST);
if($_POST['query'] == 'query1'){
//Query1 for other table One
echo "Query1 for table One ";
$resA = sql("SELECT CoNumber, Car_NO FROM rent ORDER BY `rent`.`Car_NO` ASC", $eo);
}
elseif($_POST['query'] == 'query2') {
//Query2 for other table Two
echo "Query2 for table Two";
$resB = sql("SELECT sum(t1.AmountW) AS INV, t3.CustomerName, t1.CustomerCode AS CCODE , t2.Customer_Name AS CNAme, SUM(t2.Credit) AS STA FROM creditnote t1 LEFT JOIN statement t2 on t1.CreditNO = t2.Type_NO LEFT JOIN customers t3 on t1.CustomerCode = t3.ID WHERE t1.CustomerCode > 0 GROUP by t1.CustomerCode ORDER BY `STA` ASC", $eo);
}
?>
Re: Put a custom table into a custom table
Thanks for that. I resorted to make a simple html site with several buttons, which then link to other pages, where the atual calculations are done. However the AG formatting is gone and i do not know how to link that.
Re: Put a custom table into a custom table
hello
if you would like keep style as your AppGini ,you should add this code for all your pages
in my case i was make all custom page at new folder (report)
if you will keep custom page on hooks folder you can use this code
for more information please check this link
https://bigprof.com/appgini/help/advanc ... cess-pages
if you would like keep style as your AppGini ,you should add this code for all your pages
in my case i was make all custom page at new folder (report)
Code: Select all
<?php
define('PREPEND_PATH', '../');
$report_dir = dirname(__FILE__);
include("$report_dir/../lib.php");
include_once("$report_dir/../header.php");
?>
Code: Select all
<?php
define('PREPEND_PATH', '../');
$hooks_dir = __DIR__;
include("$hooks_dir/../lib.php");
include_once("$hooks_dir/../header.php");
?>
https://bigprof.com/appgini/help/advanc ... cess-pages