Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, March 28, 2024
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  Another MySQL error 1064 - change or delete

phpMyEdit Installation     Another MySQL error 1064 - change or delete
Post new topic   Reply to topic    
 
nelliott     Joined: 24 Sep 2009   Posts: 3  
Post Posted: 2009-09-24 20:11
Back to top  Reply with quote     

I read about restricted table or column names, and the use of a hyphen in database names...but none of that seems to apply to my situation.

When trying to delete I get this error and the delete fails:

Quote:
MySQL error 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'index = 276)' at line 1


I can ADD entries just fine.

The edit page loads properly and everything looks beautiful. I can CHANGE entries, but I get the error above PLUS this additional error when doing a change:

Quote:
Warning: Invalid argument supplied for foreach() in /var/www/phpMyEdit-5.7.1/phpMyEdit.class.php on line 2731


I tried recreating the page using phpMyEditSetup.php thinking perhaps some of my simple edits were goofed up, but the new page reports the same error.

 
nelliott     Joined: 24 Sep 2009   Posts: 3  
Post Posted: 2009-09-24 23:31
Back to top  Reply with quote     

I can't say I am sure I understand exactly what happened here, but here is how I fixed it:

In order to figure this out, I changed line 368 of phpMyEdit.class.php to enable debug messages:
Code:
   function myquery($qry, $line = 0, $debug = 1) /* {{{ */


Which showed me that the SELECT statement was being generated properly, but the DELETE statement was missing the single-quotes from the table name. Here is my updated line 2776 of phpMyEdit.class.php:

Code:
$query  = 'DELETE FROM '.$this->sd.$this->tb.$this->ed.' WHERE '.$this->sd.$this->key.$this->ed.' = '.$this->key_delim.$this->rec.$this->key_delim.'';


 
doug     Joined: 10 Feb 2003   Posts: 1013   Location: Denver, Colorado (USA)
Post Posted: 2009-09-26 14:17
Back to top  Reply with quote     

Do the names of your tables and/or columns contain spaces?

 
nelliott     Joined: 24 Sep 2009   Posts: 3  
Post Posted: 2009-09-26 20:38
Back to top  Reply with quote     

Nope, no spaces or special characters or even numbers.

 
arslan1     Joined: 21 Dec 2014   Posts: 2  
Post Posted: 2014-12-21 08:36
Back to top  Reply with quote     

Do the names of your tables and/or columns contain spaces?

_________________________________________
Arslan1

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy