Score:0

error editing an item (impossible editing)

ru flag

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?

Score:1
ua flag

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 .

Duns avatar
ru flag
Sorry, but why the graphical view doesn't work any more? So far it did work withourt problem. I mean: I have a *bug*.
Nikita Kipriyanov avatar
za flag
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.
Matthew Ife avatar
jo flag
@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.
Duns avatar
ru flag
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)?
ua flag
@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`.
Duns avatar
ru flag
So, it seems that my question is o.t. Therefore, I would delete it.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.