10

I'm receiving the error below when using phpMyAdmin. It's occurring every time I create any table.

Notice in ./libraries/structure.lib.php#1881
 Undefined index: Rows

Backtrace

./libraries/structure.lib.php#2382: getHtmlForRowStatsTable(
array,
NULL,
boolean false,
boolean false,
string '',
string '',
)
./libraries/display_structure.inc.php#263: PMA_getHtmlForDisplayTableStats(
string '',
NULL,
NULL,
boolean false,
NULL,
string '?db=btc_orders&table=Rep&token=09aa3ad5cb85e33dad2a2098ed2874e2&goto=tbl_structure.php&back=tbl_structure.php',
NULL,
)
./tbl_structure.php#163: require_once(./libraries/display_structure.inc.php)

It only occurs on the one Datadase in PHPMyAdmin with no errors popping up on any others.

I've deleted all the tables and done them again with the error still occurring every time I add a new table.

Sawyer05
  • 1,604
  • 2
  • 22
  • 37
  • When you go in there with a step debugger, why does the index variable has the wrong value? – hakre Mar 29 '15 at 17:05
  • When you go in with a step debugger you can normally directly see by placing a breakpoint at the reported problem location. – hakre Mar 29 '15 at 21:55
  • In my case the problem was fixed just by making the table name lower case while I still have uppercase in the column names. – Black Mamba Jul 20 '17 at 07:23
  • The problem is a phpmyadmin bug, it fails to add the last field at the end of the statement it ends with the keword AFTER with the field name missing. ALTER TABLE `ocr_files` ADD `size` FLOAT NULL AFTER – lisandro Nov 24 '19 at 15:17

1 Answers1

34

The problem was due to having uppercase characters in the table. I switched to all lower case characters in both the table and field names and the problem disappeared.

Sawyer05
  • 1,604
  • 2
  • 22
  • 37
  • 3
    I don't think that's an actual answer, so much as a workaround. Uppercase letters are clearly allowed to be used in table names according to MySQL documentation on [identifiers](https://dev.mysql.com/doc/refman/5.0/en/identifiers.html). I have a database full of tables that start with capital letters, that has been in use for 3+ years, and phpMyAdmin only recently started to complain with this error message. I suspect this is a problem in phpMyAdmin and not the database itself. – Charles May 18 '15 at 03:06
  • 1
    It looks like this was a bug that was fixed in version [4.4.4](http://www.phpmyadmin.net/documentation/changelog.php) of phpMyAdmin. – Charles May 18 '15 at 03:21
  • 2
    Seems it's not completely fixed. That error has disappeared but adding constraints still does not appear if the table contains capital letters. I've just had to change all my tables back to lower case again – Sawyer05 Jul 19 '15 at 19:28
  • 1
    I see this error in recent version 4.7.4 too. And yes I have column names is mixed case. – Sarvap Praharanayuthan Oct 06 '17 at 06:53