Hi.
I achieved this kind of thing successfully by storing all needed fields in public vars ($_PUBLIC array) from a custom_startup_function (after checking $_GET vars are set) and using these PHP vars in the WHERE part of my SELECT_SINGLE field to filter results.
Don't forget dadabik_var tags...
IMHO, the best solution is to use triggers directly in MySQL (or MSSQL) DB.
If your calculated field is defined in the same table as inserted/updated record, you need to write two triggers, the first on BEFORE_INSERT event, and the second on BEFORE_UPDATE...
Hi Eugenio,
I understand your position, even if my example was too simple to match reality: I deal with views which share 20-30 fields with related tables, with 2 or 3 enhanced fields... So I think users would not be confusing if I present to them a INSERT form hiding 3 fields between 30.
Never...
Dear Eugenio, please find enclosed a simple example of the situations I often deal with: a test_cust table and a test_invoices table with a foreign key linked to test_cust. I want to show to the user a enhanced grid based on test_v_cust view but I would like to allow insertions/updates to the...
Hello Eugenio, and thank you for your quick answer.
I actually already got the updatable attribute back to True in many cases, but unfortunatly it's much more complicated with the insertable one: MySQL is not very flexible with that ;-)
I'm not really sure I understand your concern: just to be...
Dear Eugenio,
I use a lot of views I design in MariaDB as datasources to pages in Dadabik. This allows me to use SQL possibilities (dynamically calculated fields, subqueries, etc.) to enhance data I show in Dadabik grids.
But the dark side of this is that I loose updatable and insertable...
The problem comes from the initializing sequence: for some reason, when I try to initialize $GLOBALS['_wherefield'] at different points in my custom startup function (for example in an IF-THEN-ELSE structure), the global var is empty when the function ends :unsure: even if the file_put_contents...
If someone is facing the same problem, I found a workaround by switching 'Yes but disabled' to 'Yes' for 'emp_customer' field, and by adding a custom_required_function which hides the 'emp_customer' field according to user rights.
I know it has nothing to do with Dadabik, but it's not the first...
Hi all,
everything is in the title !
I set $GLOBALS['_wherefield'] (for example) in my custom startup function (I checked the var has a value with a file_put_contents) but when I try to read it from one custom required function, the var is empty :-(
I can't use $param parameter because I need...
Hi all.
I'm facing a problem I'm sure somebody has already dealed with.
I have basically a 'Customer', 'Employees' and 'Department' tables.
'Department' has a foreign key ('dep_customer' field) linked to 'Customer' so I can maintain a list of available departements per customer.
In the...
Hi Eugenio.
Is there a way to 'manually' hash and paste a password directly in the users table ?
I tried with embedded MD5() mysql function and I looked on http://www.openwall.com/phpass/ for an online tool to hash password but I didn't find anything.
It could be helpful for back office...
We tried to install Dadabik 11.5 (because it's the last version we got during our free upgrade period ;-))
So I've just bought a extra maintenance year and dowloaded 11.7 version...
We'll test with this new version and I'll tell you.
Thanks for your so quick answer ;-)
--
Gilles
Hi Eugenio, hope you're doing well.
We got an error msg with a new install of Dadabik: Install.php check steps are ok, but when we click on 'NEXT' button (to load install2.php page), we get an error 500 msg.
Looking in error logs of the server, we saw "PHP Fatal error: The file...