Search found 717 matches

by pböttcher
2020-02-28 09:36
Forum: Getting Started
Topic: Updating field with most recent order
Replies: 16
Views: 80

Re: Updating field with most recent order

Hi,

please post the fields of your database, otherwise it is only stumling in the dark. Please with upper/lowercase.
by pböttcher
2020-02-27 21:18
Forum: Getting Started
Topic: Updating field with most recent order
Replies: 16
Views: 80

Re: Updating field with most recent order

sql("UPDATE accounts SET `LastOrderDate` = '".$data['LastOrderDate']."' WHERE `id` = '".$data['account']."'", $eo);

assuming that id is the PK.
by pböttcher
2020-02-27 20:33
Forum: Getting Started
Topic: Updating field with most recent order
Replies: 16
Views: 80

Re: Updating field with most recent order

Hi,

can you post your tabledefinitions? Are you using any lookups? Are the accounts login and the Orders Account the same?
by pböttcher
2020-02-27 19:41
Forum: Getting Started
Topic: Updating field with most recent order
Replies: 16
Views: 80

Re: Updating field with most recent order

sql("UPDATE accounts SET `LastOrderDate` = '".$data['LastOrderDate']."' WHERE `login` = '".$data['account']."'", $eo);
by pböttcher
2020-02-27 18:00
Forum: Advanced Customizations > Hooks
Topic: Hiding column for group
Replies: 1
Views: 41

Re: Hiding column for group

Hi, dont use echo in the file. Add the Script to the $footer variable Also $memberInfo = getMemberInfo(); echo $memberInfo['group']; is not needed. And you should use the appropriate are of your tableview (either tableview or tableview+detailview) as otherwise the code will also be applied to you di...
by pböttcher
2020-02-27 17:56
Forum: Getting Started
Topic: Updating field with most recent order
Replies: 16
Views: 80

Re: Updating field with most recent order

Agree with Jan,
Try

Code: Select all

sql("UPDATE accounts SET `LastOrderDate` = '".$data['LastOrderDate']}."' WHERE `login` = '".$data['account']."'", $eo);
by pböttcher
2020-02-26 19:49
Forum: Getting Started
Topic: years of age, months and days
Replies: 12
Views: 335

Re: years of age, months and days

Hi, it would be helpful if you describe at the beginning what you try to acheive. So in your case you could change the code to: function special_sites_init(&$options, $memberInfo, &$args) { sql ("update special_sites set days_since=TIMESTAMPDIFF(day,date_attended,NOW())'", $eo); return TRUE; } This ...
by pböttcher
2020-02-25 22:14
Forum: Advanced Customizations > Others
Topic: Keep table groups expanded
Replies: 4
Views: 102

Re: Keep table groups expanded

Hi, true, sorry, overlooked that. Try not adding to the header, but the footer-extras.php the corrected version: <?php $is_homepage = (basename($_SERVER['PHP_SELF']) === 'index.php' && !isset($_REQUEST['signIn'])); if ($is_homepage) { ?> <script> $j(function() { $j('.collapse').not('.in,.navbar-coll...
by pböttcher
2020-02-25 20:42
Forum: Getting Started
Topic: years of age, months and days
Replies: 12
Views: 335

Re: years of age, months and days

Hi, function special_sites_init(&$options, $memberInfo, &$args) { if (isset ($_REQUEST ['SelectedID'])) { $id = makeSafe ($_REQUEST ['SelectedID']); sql ("update special_sites set days_since=TIMESTAMPDIFF(day,date_attended,NOW()) where id = '{$id}'", $eo); } return TRUE; } if (isset ($_REQUEST ['Sel...
by pböttcher
2020-02-25 19:04
Forum: Advanced Customizations > Others
Topic: Nav bar, links
Replies: 5
Views: 142

Re: Nav bar, links

true :)
by pböttcher
2020-02-25 19:03
Forum: Advanced Customizations > Others
Topic: Keep table groups expanded
Replies: 4
Views: 102

Re: Keep table groups expanded

Hi, you can try adding to the hooks/header-extras.php: <?php $is_homepage = (basename($_SERVER['PHP_SELF']) === 'index.php' && !isset($_REQUEST['signIn'])); if ($is_homepage) { ?> <script> $j(function() { $j('.collapse').addClass('in');$j('.collapser').children('.glyphicon').toggleClass('glyphicon-c...
by pböttcher
2020-02-24 21:55
Forum: Advanced Customizations > Others
Topic: Nav bar, links
Replies: 5
Views: 142

Re: Nav bar, links

Hi, if you do not want to edit the created file from AppGini (which will be overwritten as Jan stated), add the following to the hooks/header-extras.php file <?php $home_page = (basename($_SERVER['PHP_SELF'])=='index.php' ? true : false); if ($home_page) { ?> <script> $j(function() { var x = '<?php ...
by pböttcher
2020-02-24 21:32
Forum: Getting Started
Topic: years of age, months and days
Replies: 12
Views: 335

Re: years of age, months and days

sql ("update special_sites set days_since=TIMESTAMPDIFF(day,date_attended,NOW()) where id = '{$id}'", $ eo);

with $id having the ID of your selected record.
by pböttcher
2020-02-24 21:27
Forum: Feature Suggestions
Topic: Linking a field to the users Table
Replies: 1
Views: 79

Re: Linking a field to the users Table

Hi, you may try to create a view of the membership_users with the field you need in your database. Then create a table in AppGini with the same fields. The important part is that you add a unique id to your view. One option could be that you use the memberID (which is not numeric) and convert it to ...
by pböttcher
2020-02-23 19:34
Forum: Advanced Customizations > Hooks
Topic: Default Data in Long Text Field
Replies: 6
Views: 174

Re: Default Data in Long Text Field

Hi,

what field do you have. Is it a text field, richt text, ... ? Is it read only or are you expecting the user to enter data? Maybe you can post a screenshot
by pböttcher
2020-02-20 18:24
Forum: Getting Started
Topic: years of age, months and days
Replies: 12
Views: 335

Re: years of age, months and days

Hi, you can use sql ("update unit set age=TIMESTAMPDIFF(year,DateOfBirth,NOW()), months=TIMESTAMPDIFF(month,DateOfBirth,NOW()) % 12, days=FLOOR(TIMESTAMPDIFF(day,DateOfBirth,NOW()) % 30.4375) where id = '{$ id}'", $ eo); Where you need to replace the DateOfBirth with the correct variable that you ha...
by pböttcher
2020-02-16 20:13
Forum: Feature Suggestions
Topic: Column presets?
Replies: 3
Views: 260

Re: Column presets?

Hi,

you can add to the TABLENAME-tv.js in the hooks folder some code to add you button to there you want an upon click on the button
execute

$j('input[data-col="TABLENAME-FIELDNAME"]').click();

for each field that you want to hide.
by pböttcher
2020-02-16 19:59
Forum: Advanced Customizations > Hooks
Topic: Youtube video
Replies: 2
Views: 175

Re: Youtube video

Hi, you can try to edit the hooks/header-extras.php and add <?php $mi = getMemberInfo(); $url=basename($_SERVER['PHP_SELF'],".php"); if ($mi['group'] == 'anonymous' && $url == "index") { ?> <script> $j(function(){ $j('#login_splash').append('<iframe width="560" height="315" src="https://www.youtube....
by pböttcher
2020-02-16 18:39
Forum: Getting Started
Topic: years of age, months and days
Replies: 12
Views: 335

Re: years of age, months and days

Hi, can you explain what exactly you are looking for. From the sql statement I would assume that you set the age to amount of years of the diff between today and date (where date is an unfortune name for that field). Also you could use now() in the sql statement directly instead of getting the curre...
by pböttcher
2020-02-12 20:05
Forum: Advanced Customizations > Others
Topic: Personal budget app - calculated fields (totals)
Replies: 4
Views: 358

Re: Personal budget app - calculated fields (totals)

Hi,

hmm, I would not expect it to do so. Can you post some sample values where you can show that it does not work correctly.
by pböttcher
2020-02-11 20:45
Forum: Advanced Customizations > Others
Topic: Personal budget app - calculated fields (totals)
Replies: 4
Views: 358

Re: Personal budget app - calculated fields (totals)

Hi,

can you post the SQL you use for the picture shown. Is the transaction date a date field?
by pböttcher
2020-02-11 20:42
Forum: Feature Suggestions
Topic: Members in Multiple Groups
Replies: 28
Views: 12615

Re: Members in Multiple Groups

Hi,

at this stage a user cannot be assigned to multiple groups (to my knowledge).
by pböttcher
2020-02-11 20:41
Forum: Advanced Customizations > Others
Topic: Query Another Application Database Then Populate Add Form
Replies: 1
Views: 152

Re: Query Another Application Database Then Populate Add Form

Hi,

can you explain what the other database is. Is it a MySQL (MariaDB)? Is it running on the same server?
As you say here you want basically reproduce the auto-fill feature, correct?
by pböttcher
2020-02-08 21:11
Forum: Advanced Customizations > Hooks
Topic: sqlValue()
Replies: 6
Views: 350

Re: sqlValue()

Maybe to add to this. The SQLVALUE function returns indeed one value that you look for. The statement you describe in your question would return all fields for the selected row in your database, which would probably not be only one field and hence the the SQLVALUE function would not be the choise. I...