MySQL Forums :: Newbie :: Unknown column in 'where' clause
Unknown column in 'where' clause
Date: June 01, 2012 06:12PM
This works on my local testing box (XP, MySQL 5.1.39) perfectly well, but not on my hosted website (guessing *NIX and MySQL 5.1.55); I'm baffled:
CREATE TABLE mnu_site
record_identifier INT NOT NULL PRIMARY KEY,
menu_item SMALLINT NOT NULL UNIQUE,
menu_label VARCHAR(64) NOT NULL UNIQUE,
menu_anchor VARCHAR(96) NOT NULL,
flag_disabled CHAR(1) NOT NULL DEFAULT '0'
CREATE PROCEDURE sprc_menu_site()
WHERE flag_disabled = '0'
ORDER BY menu_item;
Executing either the procedure (CALL sprc_menu_site()), or even just the procedure body directly gives me
#1054 - Unknown column '0' in 'where clause'
I'm stumped. There are other procedures to drive other menus and a search engine so I don't have to expose the tables directly, but it's just plain-vanilla SQL like the above. Many thanks for any attention,
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.