in Education by
I am getting empty row on following sql SELECT * FROM flyers WHERE fId='6' AND 'userId'='400' MySQL returned an empty result set (i.e. zero rows). (Query took 0.0004 sec) But when i use SELECT * FROM flyers WHERE fId='6' Showing rows 0 - 0 (1 total, Query took 0.0005 sec). As i got my result and that is correct using only primary key. But i does not know why mysql returns empty row on using AND with primary key. Note:- fId is flyer table primary key. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Try this: Use back ticks for the column name not single quotes If userid is int data type it means you have to remove single quotes userid=400 If fid is string it means fID='6' SELECT * FROM flyers WHEREfId=6 ANDuserId=400

Related questions

0 votes
    On my website I am trying to program a feature, similar to facebook and twitters timeline, where a user ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 3, 2022 in Education by JackTerrance
0 votes
    On my website I am trying to program a feature, similar to facebook and twitters timeline, where a user ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    ANSI-standard SQL allows the use of special operators in conjunction with the WHERE clause. A special ... Schemes topic in chapter Concurrency Control of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    Is there any way to convert following SQL statement into LINQ? select ve.EntityID , fin1.FinanceStat as ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 23, 2022 in Education by JackTerrance
0 votes
    The relation with the attribute which is the primary key is referenced in another relation. The relation ... Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    I am trying to make a a query against a table and am kind of stuck in constructing the WHERE ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 1, 2022 in Education by JackTerrance
0 votes
    I'm new in LINQ so I hope this isn't a stupid question: I have a table with a lot of ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    I'm new in LINQ so I hope this isn't a stupid question: I have a table with a lot of ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    I'm new in LINQ so I hope this isn't a stupid question: I have a table with a lot of ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    I'm new in LINQ so I hope this isn't a stupid question: I have a table with a lot of ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    Which algorithm uses equality comparison on a key attribute with a primary index to retrieve a single ... Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    I have this table which stores containers by region and the number of coffee pouches in each of the containers. if object_id( ... = 1 ) as sq1 ) as sq2 where sq2.LagRunningTotal...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    How to create empty tables with the same structure as another table?...
asked Dec 11, 2020 in Technology by JackTerrance
0 votes
    Am trying to perform an update and nothing seems to work. It has something to do with my callback ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 11, 2022 in Education by JackTerrance
0 votes
    So the idea is that users can create collections with many pairs of words in it. For example, they ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 14, 2022 in Education by JackTerrance
...