Edit data in temporary table
Posted: Tue Feb 02, 2021 10:15 pm
Today I tried to modify data in a temporary table without succes. Maybe somebody can help me?
nuBuilder-Master downloaded 30-1-2021 from github
What I did:
1. I created a browseedit form with php in before_browse I created a new table + one record (just for testing). This (seems to) works fine. 2. I clicked on first record --> empty record opened in edit-form
I figured out what happened:
3. I added a nuDebug-line of the sql-query to my before-browse php
4. Deleted all debug-records
After opening form again I see 3 debug-records: first (oldest): SQL-syntax error:
5. After clicking on the first record again two Debug-error-lines are created: They are nearly the same ase those who where made when I opened browse-form: Only difference is a new temp-table-name in the second one
nuBuilder-Master downloaded 30-1-2021 from github
What I did:
1. I created a browseedit form with php in before_browse I created a new table + one record (just for testing). This (seems to) works fine. 2. I clicked on first record --> empty record opened in edit-form
I figured out what happened:
3. I added a nuDebug-line of the sql-query to my before-browse php
4. Deleted all debug-records
After opening form again I see 3 debug-records: first (oldest): SQL-syntax error:
second:'SELECt * FROM #TABLE_ID# WHERE id2 = '601951e106a343d'' --> #TABLE_ID# is not replaced with my temportarary browse table name + it runs before my 'before browse php'![]()
third: debug of my sql-string in 'before browse php':SQL error 'Table doesn't exist ': Select * From `___nu16019b9e97b815___` Where `id2` = '' --> new tablename is availabley but table doesn't exists + it runs before my 'before browse php'![]()
Code: Select all
CREATE TABLE ___nu16019b9e97b815___ ( `id2` varchar(25) NOT NULL, `TMP_lezen` varchar(1000) DEFAULT NULL, `TMP_tekst` varchar(1000) DEFAULT NULL, `TMP_thema` varchar(100) DEFAULT NULL, `TMP_punt1` varchar(100) DEFAULT NULL, `TMP_punt2` varchar(100) DEFAULT NULL, `TMP_punt3` varchar(100) DEFAULT NULL, `TMP_punt4` varchar(100) DEFAULT NULL, `TMP_punt5` varchar(100) DEFAULT NULL, `TMP_vrijetekst` text ) ENGINE=MyISAM DEFAULT CHARSET=utf8; INSERT INTO ___nu16019b9e97b815___ (`id2`, `TMP_lezen`, `TMP_tekst`, `TMP_thema`, `TMP_punt1`, `TMP_punt2`, `TMP_punt3`, `TMP_punt4`, `TMP_punt5`, `TMP_vrijetekst`) VALUES ('601951e106a343d', 'read bla', 'tkst', 'thema', 'pt1','pt2', 'pt3', 'pt4', 'pt5', 'kkkkk ')