spartan Posted December 19, 2013 Share Posted December 19, 2013 Hello Larry, I am working my way through Effortless E-Commerce and can't seem to create a stored procedure using the downloadable code from your site. My issue I believe is my version of phpMyAdmin 2.8.0.1 isn't supporting delimiters. I continually get this error. Is there a way to work around this? ErrorSQL query: DELIMITER $$ CREATE PROCEDURE select_categories( TYPE VARCHAR( 6 ) ) BEGIN IF TYPE = 'coffee' THEN SELECT * FROM general_coffeesORDER BY category; MySQL said: #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 'DELIMITER $$CREATE PROCEDURE select_categories (type VARCHAR(6))BEGINIF ty' at line 1 Link to comment Share on other sites More sharing options...
Christopher Bergin Posted December 19, 2013 Share Posted December 19, 2013 I know that there is a 'routines' tab at the top of the page that provides an interface for adding a new routine. The user would specify the input and output variables discretely and then enter the routine in a separate area. Here, I think you could avoid using the $DELIMITER tag but I'm sure. It's worth a shot. Link to comment Share on other sites More sharing options...
Antonio Conte Posted December 19, 2013 Share Posted December 19, 2013 The version of PHPMyAdmin is not really important, but your MySQL version might not support stored procedures. You need at least MySQL 5.1 and the correct privileges on your user to create procedures. Link to comment Share on other sites More sharing options...
daddytiger Posted January 22, 2014 Share Posted January 22, 2014 I just ran into this as well but only when trying to create stored procedures on my remote/hosted. My host (1&1) is using phpmyadmin 2.6.4, really old as is yours. In addition to the MYSQL version above, you'll need a later version of phpmyadmin to support routines. The currrent version is 4.1.5, as of Jan 22, 2014. I'd upgrade, and point to the new phpmyadmin. If you're not using localhost and stuck with the old phpmyadmin on a host, you can upload a newer phpmyadmin to it and point it to your remote database. Link to comment Share on other sites More sharing options...
Larry Posted January 22, 2014 Share Posted January 22, 2014 Yeah, the version of phpMyAdmin can make a difference here. Thanks for sharing what you learned! Link to comment Share on other sites More sharing options...
Recommended Posts