User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 391,991 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,307 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:

UDF in MySQL

Join Date: Apr 2008
Posts: 295
Reputation: tesuji is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 41
tesuji tesuji is offline Offline
Posting Whiz in Training

Re: UDF in MySQL

  #17  
Jun 4th, 2008
Hi tanha,

till this day you have been asking for UDF sample. Now you post stored procedure. I HOPE you have not mistaken UDF for stored procedure. As for UDFs, I have sent you some information how such thinks can be done with MySQL, and as you may have seen it's really a heavy job there as compared to standard SQL 1999 UDF's where it s absolutely simple. You have got such a SQL1999 sample from me. Back to your stored procedure, I believe it's also a good idea to tell us the respective error message you might have received when trying to execute this procedure.

krs,
tesu

Originally Posted by tanha View Post
Although this post is viewed by more than 800 persons, still not solved. As I mentioned I am using WAMP package, whuch has mysql verion 5.0.4 and also PhpMyAdmin and I dont know what is wrong with the following procedure:

  1. CREATE PROCEDURE procedure1 /* name */
  2. (IN parameter1 INTEGER) /* parameters */
  3. BEGIN /* start of block */
  4. DECLARE variable1 CHAR(10); /* variables */
  5. IF parameter1 = 17 THEN /* start of IF */
  6. SET variable1 = 'birds'; /* assignment */
  7. ELSE
  8. SET variable1 = 'beasts'; /* assignment */
  9. END IF; /* end of IF */
  10. INSERT INTO table1 VALUES (variable1);/* statement */
  11. END /* end of block */
Reply With Quote  
All times are GMT -4. The time now is 9:48 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC