ssp class array mathematical operation
ssp class array mathematical operation
hasanserhan
Posts: 4Questions: 1Answers: 0
$table = 'tbl';
$primaryKey = 'g';
$columns = array(
array( 'db' => 'bl', 'dt' => 0 ),
array(
'db' => 'od',
'dt' => 1,
'formatter' => function( $d, $row ) {
return ($d == 'Ödendi')?'<span class="badge badge-primary">Ödendi</span>':'<span class="badge badge-danger">Ödenmedi</span>';
}
) ,
array( 'db' => 'ad', 'dt' => 2 ),
array( 'db' => 'do', 'dt' => 3 ),
array( 'db' => 'ge', 'dt' => 4 ),
array(
'db' => 't',
'dt' => 5,
'formatter' => function( $d, $row ) {
return number_format($d,2, ',', '');
}
),
array(
'db' => 'to',
'dt' => 6,
'formatter' => function( $d, $row ) {
return number_format($d,2, ',', '');
}
),
array(
'db' => 'toplam',
'dt' => 7,
'formatter' => function( $d, $row ) {
return number_format($d,2, ',', '');
}
),
array(
'db' => 'g',
'dt' => 8,
'formatter' => function( $d, $row ) {
return '
<a href="TahsilatSil.php?Del=**'.($d*(date("Ymd"))).**'" class="btn btn-danger btn-sm" title="Sil" ><span class="fa fa-trash"></span></a>;
';
}
)
);
Del='.($d*(date("Ymd"))).'"
how can I do it
Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
Answers
How can you do what? Could you explain a little more, please.
Colin
a href="TahsilatSil.php?Del='.($d*(date("Ymd"))).'"
how can I do it
Still don't know what you want to do! Are you looking to add a query to the SQL statement based on your
Del
parameter?Allan
hello colin. Thanks for coming back.
I want to multiply data by day.
it will be like this
or
can it be like this
Sorry, my english is a bit bad,
$d
(org
in the database) is presumably a number? Anddate("Ymd")
will give you a string that contains a number such as20230522
. You could parse that as an integer (intval()
) and then multiple the to together. What happens when you try that - are you getting an error message or anything?Allan
thanks allan