stored PROCEDURE problem

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

stored PROCEDURE problem

Post by itsmani1 »

Here is my sql statement:

Code: Select all

DROP PROCEDURE IF EXISTS `check_user`;

CREATE PROCEDURE `check_user`(IN userid VARCHAR(25))
    NOT DETERMINISTIC
    SQL SECURITY DEFINER
    COMMENT ''
BEGIN
       select loginid from user where loginid=userid;
END;

I am using:

# Server version: 5.0.41-community-nt
# Protocol version: 10
# Server: localhost via TCP/IP
# User: root@localhost
# phpmyadmin

when i try to run above mentioned statement I get following error:

#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 'select loginid from user where loginid=userid' at line 6

any help?

thanks
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

update your phpMyAdmin. v 2.11.0 is said to have support for triggers, views and stored routines
Post Reply