• Welcome to KonaKart Community Forum. Please login or sign up.
 

KK_IF error

Started by Oscar, July 30, 2007, 05:51:33 am

Previous topic - Next topic

Oscar

Hi Guys,
I am trying to install KonaKart manually but i got an error when I ran the mysql scripts. here is the error:

mysql> CREATE FUNCTION KK_IF (test int, a decimal(15,4), b decimal(15,4)) RETURN
S decimal(15,4) deterministic return IF(test, a, b);
ERROR 1064 (42000): 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 '(test
int, a decimal(15,4), b decimal(15,4)) RETURNS decimal(15,4) deterministic' at
line 1

The plataform that i am using is windows Xp and MySql 4.1, please can one of you experienced guys help me?
please advice!

Thanks in advance,
Oscar

john

Hi Oscar,

Thanks for the post.

I'm afraid that when we added KK_IF for the support for the 5 leading databases (Oracle, DB2, MS SQL Server, MySQL and PostgreSQL) we inrtoduced this syntax that requires MySQL 5 or later.  Can you upgrade to mySQL 5 (or use PostgreSQL, or one of the others)?

The directory naming (database/MySQL-4.1) is due to historical reasons and rather misleading so we'll fix that in the next release.

Rgeards,
John

Oscar

Thanks for advice John,
I used MySql 4.1 because it is recomended in the KonaKart installation manual. I do not have any problem upgrading my version of mysql. but anyway I'll tell you how it goes.

Thanks,
Oscar

john

Hi Oscar,

I don't think v 4.1 was ever specifically recommended, only MySQL itself, but I admit that seeing "MySQL-4.1" in the installation notes could have been misleading... This was ok for previous releases (prior to the introduction of the KK_IF function for portability across all the databases) but not no longer and we will correct that in the kits and the documentation soon.

Good news that you can upgrade your MySQL anyway.  That will save a lot of problems.

Good luck and please let us know how you get on,
John

Oscar

I upgraded my MySQL from 4.1 to 5.0 and I could run the database scritps successfully.

Thanks you very much for your help Jhon.

Oscar.


joel

Is their a solution to this that doesn't require upgrading to MySQL 5. The hosting company I am using only support MySQL 4.

Thank....

Brian

Hi Joel,

No simple answer here I'm afraid.   

I believe that KonaKart 2.2.0.3 can be used with MySQL 4.1 but not the more recent versions.  The problem with this is that you'd miss out on all the features added since then.

Can you use another database?  PostgreSQL 8.2 or later?  how about Oracle/DB2/MS_SQL Server?

Really the best option is to move up to MySQL 5..  can't you install one yourself or doesn't your hosting company allow that?  (Better still, get your hosting company to move up to the latest MySQL).

Regards,
Brian

joel

Hi Brian,

Unfortunately my hosting company only provide MySQL and for some reason they say they are not able to upgrade.

Is there any work around for this can I not redefine the function to be compatible with MySQL4.x?

Thanks,

Joel Shotton
www.clee-cycles.co.uk

Brian

October 26, 2007, 09:32:17 am #8 Last Edit: October 26, 2007, 09:57:26 am by Brian
Hi Joel,

As a keen cyclist I would be particularly pleased to see you set up a KonaKart store but unfortunately there is no simple workaround.

It's a shame your hosting company can't upgrade to the latest MySQL since MySQL 4 is getting quite old now.  Perhaps you could consider a move to a new hosting company?

-- We could provide a special version that would work with MySQL 4, but it would be out of the scope of this forum/community support.  If you're interested in this, please write an email to "sales at konakart dot com" for details.

Regards,
Brian



johnclaus

To all,

I've read the posts on this thread stating the latest version of KonaKart is incompatible with versions of MySQL prior to version 5.  Apparently KonaKart 2.2.03 is the latest version compatible with MySQL 4, but I'm unable to find the download anywhere on the KonaKart site.

We're running MySQL 4.2.20 and have no authority to upgrade and those in charge will not upgrade.  Any help finding KK v2.2.03 source would be GREATLY appreciated.

Thanks again,
John

ming

Hi John,

QuoteI've read the posts on this thread stating the latest version of KonaKart is incompatible with versions of MySQL prior to version 5.


Actually I think the most recent versions of KonaKart are indeed compatible with MySQL 4.* - the only problem is that the automated database creation at install time will fail with the included MySQL scripts.   You have to modify those scripts (konakart_demo.sql is the script to modify) and load them manually, but once that's done KonaKart will run just fine.  (I can't remember what you have to change, but if you run the script it should be obvious - and the changes aren't complicated).  If you do this and get a version of konakart_demo.sql that works for an early version of MySQL, then please contribute it to this forum!

QuoteApparently KonaKart 2.2.03 is the latest version compatible with MySQL 4, but I'm unable to find the download anywhere on the KonaKart site.


Alternatively you can access version 2.2.0.3 at:

http://www.konakart.com/kits/KonaKart-2.2.0.3-Windows-Setup.exe
http://www.konakart.com/kits/KonaKart-2.2.0.3-Linux-Install
http://www.konakart.com/kits/KonaKart-2.2.0.3-Linux-Install.zip
http://www.konakart.com/kits/KonaKart-2.2.0.3.zip

Regards,
Ming