I got "null" after selecting records from a table in the database. The table is created by me. I know how many records will be selected. Just cannot be null.
I cannot help wonder if my SELECT statement is correct - I want records to be selected if user_role is equal to the userrole I supplied AND if journal_category is equal to the category I supplied. My statement is: String query = "SELECT user_name FROM members WHERE user_role = '" + userrole + "' AND journal_category = '" + category + "'"; Do anybody see any mistake? __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]