We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

markhuots File extension problems

Development and Programming

c_k's avatar
c_k
98 posts
16 years ago
c_k's avatar c_k

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?

       
Bruce2005's avatar
Bruce2005
536 posts
16 years ago
Bruce2005's avatar Bruce2005

When I was using it, I found I had to disable the extension, change upload preferences and then enable it again. There may be a better way, but that’s what I found.

       
c_k's avatar
c_k
98 posts
16 years ago
c_k's avatar c_k

I tried that, However, it will not allow me to upload anything. When I try I get this error: There was a problem uploading ‘banner01-sub.jpg’.

So I can not go into the upload preferences to modify the settings to change it, to see if another setting will work.

       
ummedia's avatar
ummedia
462 posts
16 years ago
ummedia's avatar ummedia

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

       
Bruce2005's avatar
Bruce2005
536 posts
16 years ago
Bruce2005's avatar Bruce2005
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

       
ummedia's avatar
ummedia
462 posts
16 years ago
ummedia's avatar ummedia

Thanks Bruce I had been there and tried all of that but got a mysl error on upload, couldnt get anybody to respond. It would be nice to know that what I was doing was possible.

regards

Adam

       
Bruce2005's avatar
Bruce2005
536 posts
16 years ago
Bruce2005's avatar Bruce2005

DDo you have solspaces gallery extended installed? I know they clash, or perhaps with another ext?

       
ummedia's avatar
ummedia
462 posts
16 years ago
ummedia's avatar ummedia

I removed everything in fact at the time I only had Marks extension and the other one they suggest to make it work in the thread. I then added the image sizer plugin. Can I ask if you have had this working and is it worth going back to?

regards

Adam

       
Bruce2005's avatar
Bruce2005
536 posts
16 years ago
Bruce2005's avatar Bruce2005

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.

       
ummedia's avatar
ummedia
462 posts
16 years ago
ummedia's avatar ummedia

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

       
Bruce2005's avatar
Bruce2005
536 posts
16 years ago
Bruce2005's avatar Bruce2005
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.

       
ummedia's avatar
ummedia
462 posts
16 years ago
ummedia's avatar ummedia

Thanks Bruce, really kind to take the time. I will have to look tomorrow to see if I can recoup the money spent on the stand alone image editor that didnt work.

kind regards

Adam

       
c_k's avatar
c_k
98 posts
16 years ago
c_k's avatar c_k

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?
       
mogya's avatar
mogya
11 posts
16 years ago
mogya's avatar mogya

> Anyone have any ideas for my original post?

Which mysql you’re using? If mysql version<4.1.0, file extention doesn’t work. The reason is, file extention uses “ON DUPLICATE KEY UPDATE” syntax which was added in MySQL 4.1.0.

       
silenz's avatar
silenz
1,648 posts
16 years ago
silenz's avatar silenz

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.

       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.