Skip navigation links

MySQL Forums :: Newbie :: Unknown column in 'where' clause


Advanced Search

Unknown column in 'where' clause
Posted by: Dorky Guy ()
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()
SELECT menu_item,
menu_label,
menu_anchor
FROM mnu_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,

Options: ReplyQuote


Subject Written By Posted
Unknown column in 'where' clause Dorky Guy 06/01/2012 06:12PM
Re: Unknown column in 'where' clause laptop alias 06/02/2012 04:57AM
Re: Unknown column in 'where' clause Dorky Guy 06/02/2012 08:48AM
Re: Unknown column in 'where' clause Dorky Guy 06/03/2012 12:59PM


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.