| Index
» Projekty
» phpMyEdit
» Fórum
» Use of filters |
 |
paul.mac
Založený: 26.08.2008
Príspevky: 5
Zaslal: 2008-09-01 09:22
Návrat hore
Odpovedať s citátom
|
Hi,
I have a database field set up as a set('7000', '7100', '7101', '7102', '7103', '7104', '7105', '7106', '7107', '7108')
and a filter defined as
$opts['filters'] = "group = '7000'";
the field options are set as
$opts['fdd']['group'] = array(
'name' => 'group',
'select' => 'N',
'sort' => true
);
Yet I get the following error
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 'group = '7000')' at line 1
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 'group = '7000') ORDER BY `PMEtable0`.`id`' at line 1
phpMyEdit error: invalid SQL query
--------------------------------------------------------------------------------
SELECT `PMEtable0`.`taskDescription` AS `qf0`,`PMEtable0`.`raci1` AS `qf1` .........
`PMEtable0`.`group` AS `qf49`,`PMEtable0`.`id` AS `qf50` FROM `table1` AS `PMEtable0` WHERE (group = '7000') ORDER BY `PMEtable0`.`id`13.342 miliseconds
Thanks
Paul
|
ajh
Založený: 17.12.2003
Príspevky: 236
Zaslal: 2008-09-01 16:14
Návrat hore
Odpovedať s citátom
|
Think you'll find the problem is that "group" is a reserved word for MySQL (as in "group by"). Try changing the field name.
|
paul.mac
Založený: 26.08.2008
Príspevky: 5
Zaslal: 2008-09-02 09:54
Návrat hore
Odpovedať s citátom
|
You were correct, changing the name of the field worked.
Starnge that it didn't throw up an error in phpMyAdmin!
Thanks
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|