Search the Community
Showing results for tags 'where id'.
Hi, I have a MySql query which currently looks like this Query = "select Question,Answer1,Answer2,Answer3,CorrectAnswer,id,Duplicate from Questions where id='" + RandomN.Text + "'" As you can see I have a table called 'Questions' which has several columns, Im using VB.NET I also have a textBox on a windows form called 'RandomN' What this does is it takes whatever number is in my textBox called RandomN.Text and looks for that number in the id column and returns all data on that row. What I am trying to acheive now is this, I have a column called Duplicate it will either contain the word 'True' or 'False' I would like it to only return data from the given number in the textBox if the Duplicate column in that row contains the word 'False' If someone can shed some light I would be greatful. Thanks
Hello, I m a beginner level about writing mysql queries. Shortly and simply my tables are as follows; userTable userid-specs 1-1,2,3 2-10,11 specsTable specid-label 1-football 2-basketball 3-tennis and my query is as follows; SELECT * FROM userTable ut, specsTable st WHERE ut.userid = 1 AND st.specid IN (ut.specs) and it gives me the wrong result like; userid_specs_specid_label 1_1,2,3_1_football where i need an output like this; userid_specs_specid_label 1_1,2,3_1_football 1_1,2,3_2_basketball 1_1,2,3_2_tennis actually output like this would be better (if it can be done) (At the end I m gonna print it like this) [userid:1] can play football,basketball,tennis So my question is, what is it i m missing and it gives me the wrong result? Thank you in advance for your help.