niconico Posted July 12, 2007 Share Posted July 12, 2007 I'm wondering what could be wrong with a new table I created, which I can't query in any manner. Even phpmyadmin can't query this table. All other tables I've created work fine and I can SELECT, INSERT or UPDATE without any difficulty. Does this indicate a particular problem that I should be looking into? Quote Link to comment https://forums.phpfreaks.com/topic/59648-solved-cant-query-table/ Share on other sites More sharing options...
fenway Posted July 12, 2007 Share Posted July 12, 2007 i assume it exists in show tables? what does check table say? Quote Link to comment https://forums.phpfreaks.com/topic/59648-solved-cant-query-table/#findComment-296588 Share on other sites More sharing options...
niconico Posted July 12, 2007 Author Share Posted July 12, 2007 I got frustrated, dropped the table and rebuilt it. It's fine now. I've never experienced that kind of corruption before. I've noticed that my host is running a bad/hacked/? version of phpmyadmin. I wonder if that had anything to do with it. Using the Insert Button and submitting the data results in the following: Warning: Invalid argument supplied for foreach() in /usr/local/cpanel/base/3rdparty/phpMyAdmin/tbl_replace.php on line 147 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/cpanel/base/3rdparty/phpMyAdmin/tbl_replace.php:147) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/ob.lib.php on line 64 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/cpanel/base/3rdparty/phpMyAdmin/tbl_replace.php:147) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/header_http.inc.php on line 13 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/cpanel/base/3rdparty/phpMyAdmin/tbl_replace.php:147) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/header_http.inc.php on line 14 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/cpanel/base/3rdparty/phpMyAdmin/tbl_replace.php:147) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/header_http.inc.php on line 15 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/cpanel/base/3rdparty/phpMyAdmin/tbl_replace.php:147) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/header_http.inc.php on line 16 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/cpanel/base/3rdparty/phpMyAdmin/tbl_replace.php:147) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/header_http.inc.php on line 19 Quote Link to comment https://forums.phpfreaks.com/topic/59648-solved-cant-query-table/#findComment-296660 Share on other sites More sharing options...
fenway Posted July 13, 2007 Share Posted July 13, 2007 Sounds like a corrupted install. Quote Link to comment https://forums.phpfreaks.com/topic/59648-solved-cant-query-table/#findComment-297317 Share on other sites More sharing options...
niconico Posted July 13, 2007 Author Share Posted July 13, 2007 I'm embarrassed to learn the cause of the original problem. I created the tables manually in phpmyadmin based on a schema borrowed from and MS Access application. Apparently phpmyadmin will allow you to create/name a table using a reserved word, which in this case was 'order'. Duh, no wonder I couldn't query the table. When I dropped and rebuilt the table I selected 'purchase' as a new name since it seemed more in context with the application. This is the reason the query starting working again. Quote Link to comment https://forums.phpfreaks.com/topic/59648-solved-cant-query-table/#findComment-297362 Share on other sites More sharing options...
fenway Posted July 13, 2007 Share Posted July 13, 2007 I'm embarrassed to learn the cause of the original problem. I created the tables manually in phpmyadmin based on a schema borrowed from and MS Access application. Apparently phpmyadmin will allow you to create/name a table using a reserved word, which in this case was 'order'. Duh, no wonder I couldn't query the table. When I dropped and rebuilt the table I selected 'purchase' as a new name since it seemed more in context with the application. This is the reason the query starting working again. Yes, I've always hated that every single freakin' application puts backticks around every string literal -- masking the fact that reserved keywords are used (desc for description is my personal favorite). FWIW, I always include an underscore in my field names, which prevents 99.9% of accidental reserved keyword usage -- especially for newer keywords for SP, like "start". Quote Link to comment https://forums.phpfreaks.com/topic/59648-solved-cant-query-table/#findComment-297468 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.