0

In some tables (either myisam or innodb) I get this error:

CODE: SELECT ALL
Warning in ./libraries/classes/InsertEdit.php#1765
 implode(): Invalid arguments passed

Backtrace

InsertEdit.php#1765: implode(
string ',',
string 'pro_doct',
)
ReplaceController.php#312: PhpMyAdmin\InsertEdit->getCurrentValueForDifferentTypes(
boolean false,
string '2ab6240bef8140b28277f912b86342bf',
array,
string '\'\'',
array,
integer 0,
array,
array,
array,
boolean false,
boolean true,
string '`bibliografie`.`ID` = 2',
string 'bibliografie',
array,
)
Routing.php#192: PhpMyAdmin\Controllers\Table\ReplaceController->__invoke(
,
array,
)
index.php#43: PhpMyAdmin\Routing::callControllerForRoute(
,
string '/table/replace',
,
,
)

And in phpmyadmin I cannot copy tables from a (local) database to another (local) one, as I had always do. Now I can only export/import (without error messages).

I use xampp for Linux.

Server: Localhost via UNIX socket
Tipo di server: MariaDB
Connessione Server: SSL inattivo Documentazione
Versione del server: 10.4.17-MariaDB - Source distribution
Versione protocollo: 10
Utente: root@localhost
Codifica caratteri del server: cp1252 West European (latin1)
Web server: Apache/2.4.46 (Unix) OpenSSL/1.1.1i PHP/7.4.14 mod_perl/2.0.11 Perl/v5.32.0
Versione del client del database: libmysql - mysqlnd 7.4.14
Estensione PHP: mysqli

Versione PHP: 7.4.14

EDIT

I noticed that now I cannot create views anymore: the "create view" link doesn't work anymore.

EDIT

My question is: how can I use the console to check what kind of problem there is, and how fix it?

Duns
  • 1
  • 2

1 Answers1

1

Learn to use the "mysql" CLI.

To copy data from one table to another (assuming compatible schema definitions):

INSERT INTO db2.t2  SELECT * FROM db1.t1;

VIEWs have been around for a long time. What version of MySQL are you using?

CREATE VIEW foo(a INT, b VARCHAR(22))
AS SELECT ...;

(There are other options; see https://dev.mysql.com/doc/refman/8.0/en/create-view.html .)

Caution: MySQL Views are syntactic sugar; do not expect any performance benefit.

SQL questions are better handled at stackoverflow.com .

DBA questions are better handled at dba.stackexchange.com .

Rick James
  • 2,058
  • 5
  • 11
  • Sorry, but why the graphical view doesn't work any more? So far it did work withourt problem. I mean: I have a *bug*. – Duns May 24 '22 at 19:43
  • 1
    You have a bug, congratulations, here is how to avoid it. The suggested solution is completely correct and valid. Learn SQL and learn how to work with RDBMS core, not with their fancy graphical bells and whistles. ServerFault is not the place where software bugs to be reported, also this question is off-topic here. – Nikita Kipriyanov May 25 '22 at 08:22
  • @Duns The bug exists in the code you are using to manage the DB, not MyISAM or InnoDB. implode() is a PHP function not a SQL one. The workaround is to not use PHP and learn native SQL. You could always fix the bug yourself, or appeal to the code author / pay the author to fix it. – Matthew Ife May 25 '22 at 08:53
  • I see. Thank you. Now my question is: are you absolutely sure that here is not question of _mysql_ at all, but, at least, of php (or javascript)? In other words, can I be sure that this problem is not a symptom that my mysql data are corrupted or that there is something wrong in mysql server (or client)? – Duns May 25 '22 at 13:52
  • @Duns - Many questions spill into multiple categories, or the Asker does not necessarily know where the problem lies. (I think ServerFault is a poor place for anything relating to MySQL and is UIs, but I try to answer questions there anyway.) MySQL (especially Engine=InnoDB) essentially never corrupts data, so we look for other causes first. There are 2 log files (...log and ...err) that _may_ have a clue. If the link fails, search the web for `mysql create view`. – Rick James May 25 '22 at 14:33
  • So, it seems that my question is o.t. Therefore, I would delete it. – Duns May 27 '22 at 03:46