phpMyEdit - Viewing Bug Advanced Details [ Go Back ]
308 core / general major always 2005-02-17 23:32 2005-05-04 13:36
gardnc Intel  
Linux  
normal Fedora Core 2  
feedback 5.4 (stable)  
? open  
none  
none  
Fails with table error
php 4.3.10-2.4

Mature scripts fail on this server. Error:
Unknown column 'PMEtable0.Array' in 'field list'

SELECT PMEtable0.Array AS qf0,PMEtable0.Array AS qf1,PMEtable0.Array AS qf2,PMEtable0.Array AS qf3,PMEtable0.Array AS qf4,PMEtable0.Array AS qf5,PMEtable0.Array AS qf6,PMEtable0.Array AS qf7,PMEtable0.Array AS qf8,PMEtable0.Array AS qf9,PMEtable0.Array AS qf10,PMEtable0.Array FROM dealer AS PMEtable0 ORDER BY PMEtable0.Array LIMIT 1245,157.344 miliseconds
https://gosafco.com/Sysadmin/testdealer.php
Error shows PMEtable0.Array instead of PMEtable0.COLUMN-NAME
0000308-testdealer.php.txt (6 KB) 1970-01-01 01:33

Bug Notes
nepto   
2005-03-05 13:20   
This is not related to the phpMyEdit homepage.

There is no need to have this as a private entry.
gardnc   
2005-03-05 13:56   
This was an issue with PHP 4.3.10 and a less than current copy of Zend Optimizer. foreach loops failed unless syntax as:

foreach ($file as $key -> $record)

I cnanged every occurance in phpMyEdit to use this syntax and it resolved this problem.
nepto   
2005-03-06 21:09   
Just a question I understand the problem well.

Current phpMyEdit foreach() loops look like this:

foreach ($array as $key => $val)

Do you suggest to change it to:

foreach ($array as $key -> $val)

Note the => substitution for -> (regexp: s/=>/->/g)

Am I right?
bd   
2005-05-04 13:36   
Im a running a mature script which works fine on PHP 4.3.4.
I have a production server running with PHP 4.3.10 and I have the same problem.
And the substitution foreach ($array as $key -> $val) instead of foreach ($array as $key => $val) doses not change anything.

In both case, I have this error message :

MySQL error 1054
Unknown column 'PMEtable0.Array' in 'field list'
------------------------------------------------------------------------
phpMyEdit error: invalid SQL query
-------------------------------------------------------------------------------
SELECT PMEtable0.Array AS qf0,PMEtable0.Array AS qf1,PMEtable0.Array AS qf2,PMEtable0.Array AS qf3,PMEtable0.Array AS qf4,PMEtable0.Array AS qf5,PMEtable0.Array FROM mytable AS PMEtable0 ORDER BY PMEtable0.Array LIMIT 0,15

Any advice or solution ???
Thank you.