문제

Here is my query that i am running but its returning me nothing even data exists in column i am trying to pass keywords mention by user and searching data in DB and providing result to the user.

My query is:

SELECT fatwa.question_id, question.ques_img_name 
FROM fatwa, question  
WHEREfatwa.fatwa_keywords LIKE "hadees" AND fatwa.question_id =question.id 

While here is my Database: table image

도움이 되었습니까?

해결책

Execute your Query like:

SELECT fatwa.question_id, question.ques_img_name 
FROM fatwa, question  
WHERE fatwa.fatwa_keywords LIKE '%hadees%' AND fatwa.question_id =question.id 

More information go to: sqlite_like_clause

다른 팁

Use single quote with like statement:

SELECT fatwa.question_id, question.ques_img_name 
FROM fatwa, question  
WHERE fatwa.fatwa_keywords LIKE '%hadees%' AND fatwa.question_id =question.id

question_id should be an integer.

Change your query to the following:

SELECT fatwa.question_id, question.ques_img_name 
FROM fatwa, question  
WHERE fatwa.fatwa_keywords LIKE '%hadees%' AND fatwa.question_id =question.id 

you are not using like command properly.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top