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 'delimiter ';;' create procedure weblinks_schema_change() begin /* delete colum' at line 1 SQL=delimiter ';;' create procedure weblinks_schema_change() begin /* delete columns if they exist */ if exists(SELECT * FROM information_schema.columns WHERE table_name = '#__weblinks' AND column_name = 'sid') THEN ALTER TABLE mmp_exd_j25_weblinks
DROP COLUMN sid
;
Package Install: There was an error installing an extension: com_weblinks.zip
I tried several different syntaxes, however it doesn't appear that the delimiter works for non-command-line API.
So any suggestions on how to run a query to drop a column if it exists without throwing errors? That's exactly what this was trying to get around.
maybe change the delimiter ";;" to delimiter //
That won't work, unfortunately. The "delimiter" command doesn't appear to be allowed at all in this context.
maybe separate sql scripts?
@mbabker, I'm not seeing a good/easy way to do it
Ya, that was the only way I could find since there isn't a native IF EXISTS
format in this case.
@jimijon What do you mean by separate scripts? If the file is in the folder our manifest says to use for update processing, it gets run automatically. If it isn't there, it won't run, but then a user would have to manually get the file's contents and run it via phpMyAdmin or some other resource. And I don't think that's a very viable option either.
Well IF EXISTS doesn't work,,, then maybe create a new table, and then insert the data with the columns that are necessary.
What about a PHP update script?
That's an option. We can use our extension update script feature and the JDatabase API to process that part of the SQL update.
Same problem here.
Upgraded from 2.5.28 to 3.4.0 and the Weblinks component was not working well. Tried to install the extension package, but this error appears.
I am upgrading from Joomla! 2.5.28 to 3.4.1 and I have encountered the described error. Do I understand correctly that manually performing a Drop on column sid in table ..._weblinks corrects the issue? If not, what all is involved?
I appreciate your help.
Thank you zero-24 ... I installed the package and saw a happy Success!
message.
Yours in service,
Keith G.
MAWS Internet Trustee
+1.310.863.9943
On Wed, Apr 1, 2015 at 2:30 PM, zero-24 notifications@github.com wrote:
Please try this: #30
#30 (package download
included)—
Reply to this email directly or view it on GitHub
#25 (comment)
.
Same error here.
PHP 5.4.16 cgi-fcgi
MySQL 5.6.19