When I try to add or change the File Upload Preferences, I get the following error:
MySQL ERROR:
Error Number: 1064
Description: 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 ‘ON DUPLICATE KEY UPDATE id=values(id), key
=values(key
), val
Query: INSERT INTO exp_mh_file VALUES(”, 2, ‘allow_multiple’, ‘no’) ON DUPLICATE KEY UPDATE id=values(id), key
=values(key
), value=values(value)
Any ideas how to fix this?
Are there any other options to this I couldnt get it working in the stand alone entry form but could in the CP. I have also tried the Stand Alone Image Editor plugin which works in the CP, the stand alone Entry form but will not work in the Edit form. All I want to do is let my users upload their images and change them if they require(but not in the CP). It cant be that difficult surely.
Adam
I couldnt get it working in the stand alone entry form
try this post I know its there somewhere in the 686 posts, below may be better ..file- SAEF
I have had it working, but it clashed with solspaces gallery extension so I don’t use it. Depends on your situation. It is really handy for multiple uploads. I know I had big problems when I tried to install for a client on a windows server. Gave that up. And have a client now where it would be ideal.
I am building a site called digitalwatchlibrary.com I have the enrty and the edit form working exactly as I want except for the pictures. They are the most important bit. At the moment I am using the Stand Alone Image Editor but cant get that to work as I want. So I am in limbo.
regards
Adam
I want except for the pictures. They are the most important bit.
I use: this system Easier to show on my site. I have used this also on several production sites now. Works perfectly and using the gallery eleminates resizing. One click upload and resize, the reason we got solspace to make the module several years ago.
Anyone have any ideas for my original post?
When I try to add or change the File Upload Preferences, I get the following error: MySQL ERROR: Error Number: 1064 Description: 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 ‘ON DUPLICATE KEY UPDATE id=values(id), `key`=values(`key`), val Query: INSERT INTO exp_mh_file VALUES(’‘, 2, ‘allow_multiple’, ‘no’) ON DUPLICATE KEY UPDATE id=values(id), `key`=values(`key`), value=values(value) Any ideas how to fix this?
If you open the extension file and replace
$DB->query("INSERT INTO exp_mh_file VALUES('', {$id}, '{$key}', '{$value}') ON DUPLICATE KEY UPDATE id=values(id), `key`=values(`key`), value=values(value)");
with
$DB->query("REPLACE INTO exp_mh_file VALUES('', {$id},'{$key}','{$value}')");
it might work on your system, too.
Twice, line 147 and 491.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.