Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Piatok, 29. marec 2024
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Another MySQL error 1064 - change or delete

phpMyEdit Installation     Another MySQL error 1064 - change or delete
Odoslať novú tému   Odpovedať na tému    
 
nelliott     Založený: 24.09.2009   Príspevky: 3  
Príspevok Zaslal: 2009-09-24 20:11
Návrat hore  Odpovedať s citátom     

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:

Citácia:
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:

Citácia:
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     Založený: 24.09.2009   Príspevky: 3  
Príspevok Zaslal: 2009-09-24 23:31
Návrat hore  Odpovedať s citátom     

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:
Kód:
   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:

Kód:
$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     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2009-09-26 14:17
Návrat hore  Odpovedať s citátom     

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

 
nelliott     Založený: 24.09.2009   Príspevky: 3  
Príspevok Zaslal: 2009-09-26 20:38
Návrat hore  Odpovedať s citátom     

Nope, no spaces or special characters or even numbers.

 
arslan1     Založený: 21.12.2014   Príspevky: 2  
Príspevok Zaslal: 2014-12-21 08:36
Návrat hore  Odpovedať s citátom     

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

_________________________________________
Arslan1

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov