help on mysql stored procedure

Discussion in 'MySQL' started by smbasha, Jul 16, 2008.

  1. #1
    HI all,
    am trying to execute this simple stored procedure by using phpmyadmin

    DROP PROCEDURE IF EXISTS p;
    CREATE PROCEDURE p ()
    BEGIN
    SELECT * FROM `timezones` WHERE 1;
    END

    but am getting this error

    MySQL said: Documentation
    #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 * FROM `timezones` WHERE 1' at line 3

    any one help on this error
     
    smbasha, Jul 16, 2008 IP
  2. Social.Network

    Social.Network Member

    Messages:
    517
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    35
    #2
    Social.Network, Jul 17, 2008 IP
  3. smbasha

    smbasha Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks for your reply .

    if i am using with out where condition it is giving same error.
     
    smbasha, Jul 17, 2008 IP
  4. October

    October Member

    Messages:
    84
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #4
    Social network hit the nail on the head.
     
    October, Jul 17, 2008 IP