Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » RADICORE Installation Issues » V 2.17.0 - dml.mysqili.class.inc
V 2.17.0 - dml.mysqili.class.inc [message #7529] Sun, 06 December 2020 08:49 Go to next message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
Hi Tony,

after installing the new version V 2.17.0 I get some fatal errors like this:

Fatal Error: MySQL: Duplicate column name 'created_date' (# 1060)
SQL query: SELECT count(*) FROM (
SELECT * FROM orga_mannschaften_kontakte
LEFT JOIN orga_kontakte ON (orga_kontakte.pool_user_id = orga_mannschaften_kontakte.kontakt_ma_user_id AND orga_kontakte.pool_user_seq_no = orga_mannschaften_kontakte.kontakt_ma_user_seq_no)
WHERE (orga_mannschaften_kontakte.verbaende_art_id= 'LV' AND orga_mannschaften_kontakte.verbaende_kuerzel= 'HV S' AND orga_mannschaften_kontakte.vereine_kuerzel= 'MOSKITOS' AND orga_mannschaften_kontakte.saison_id= '2020/2021' AND orga_mannschaften_kontakte.mannschaften_id= 'DA I') AND orga_mannschaften_kontakte.rdcaccount_id IN ('1', '5')
) AS x
Error in line 682 of file '/var/www/vhosts/mgh-saar.de/includes/dml.mysqli.class.inc'.
Host Info: Localhost via UNIX socketServer Version: 5.5.5-10.1.47-MariaDB-0ubuntu0.18.04.1Client Version: mysqlnd 7.4.13, Character sets - client: utf8mb4, - connection: utf8mb4, - database: utf8mb4, - server: utf8mb4
PHP_SELF: /htmanager/htm/orga_mannschaften_kontakte(list2).php

I checked the database table in the dict table and exported all database tables to PHP once more but still the same result. Is it because of a change in the dml.mysqli.class.inc or do I have to do something special?

Best Regards,

Juergen
Re: V 2.17.0 - dml.mysqili.class.inc [message #7530 is a reply to message #7529] Sun, 06 December 2020 12:12 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
As the SQL_CALC_FOUND_ROWS query modifier is being deprecated in MySQL 8 (refer to https://dev.mysql.com/doc/refman/8.0/en/information-function s.html#function_found-rows) I have had to perform the count in a separate query. I do this by enclosing the query in the following
SELECT count(*) FROM (
   ... your query ...
) AS x
If your query starts with 'SELECT *' and joins to one or more other tables, then any column name which appears in more than one table will be flagged as a duplicate. You can get around this by specifying 'SELECT <table>.*' so that it ignores columns on any JOINed tables.

I am surprised that the call to selectAllColumns() within the _sqlAssembleWhere() method of std.table.class.inc did not automatically replace '*' with a full list of column names. This is followed by a call to removeDuplicateFromSelect() which is supposed to remove any duplicate column names and so avoid this issue.


Re: V 2.17.0 - dml.mysqili.class.inc [message #7531 is a reply to message #7530] Mon, 07 December 2020 11:03 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
It works if I change my controller scipts in the way you wrote.
Re: V 2.17.0 - dml.mysqili.class.inc [message #7532 is a reply to message #7530] Mon, 07 December 2020 11:12 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
But I have one more problem: If I want to add a record with a popup task and want to search the table, the form is empty and I can nothing choose.
If I choose a record the popUpReturn gives back the first sentence of the table and not the record I have chosen.
Re: V 2.17.0 - dml.mysqili.class.inc [message #7533 is a reply to message #7532] Mon, 07 December 2020 11:50 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
If the popup form is not showing the correct contents of that table then you need to examine the database query that it is constructing and executing.

If you are able to select a record in the popup form, but the wrong record is being loaded in the calling form, then you need to step through with your debugger starting at the _cm_popupReturn() method in the calling form to see what primary key is being returned and what record is being read from that table.


Re: V 2.17.0 - dml.mysqili.class.inc [message #7534 is a reply to message #7533] Tue, 08 December 2020 04:06 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
I found the error. It seems to me a little bit strange but I have had this a few times before. After I exported the affected tables to PHP once again, everything worked fine again. I didn't change the table structure before. Strange but it works. Thank you.
Re: V 2.17.0 - dml.mysqili.class.inc [message #7535 is a reply to message #7534] Tue, 08 December 2020 04:50 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
That's strange, but at least the error has gone away. I still wonder what it was, though.

Re: V 2.17.0 - dml.mysqili.class.inc [message #7536 is a reply to message #7535] Wed, 09 December 2020 06:47 Go to previous message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
I have changed my scripts and at the moment everything works fine. Maybe there is/was a problem with the caching?! Anyway, as long as I know that this could cause an error in my environment, I will export to PHP once more and see if this was the root cause.
Previous Topic: Logon issue at installation
Next Topic: Installation issue
Goto Forum:
  


Current Time: Sat Nov 23 02:55:20 EST 2024

Total time taken to generate the page: 0.01145 seconds