Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8905479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:24:13+00:00 2026-06-15T02:24:13+00:00

SELECT keyword FROM ( SELECT tutor_Name AS keyword FROM t UNION SELECT subject_name AS

  • 0
SELECT keyword 
FROM
(
    SELECT tutor_Name AS keyword FROM t
    UNION
    SELECT subject_name AS keyword FROM s
    UNION
    SELECT institute_name AS keyword FROM i
) s
WHERE keyword LIKE '%$queryString%' 
LIMIT 10

this query display a list with subjects, tutor names, cities according the keyword. Now I need to modify this query with more values. For an example there is a tutor name in the list I want to display his/her current city, his/her profile image etc. So I need to get those values from my city table, address table, tutorImages table.. So anybody can help me to make this query?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:24:14+00:00Added an answer on June 15, 2026 at 2:24 am

    Try this it will work:

    $q = "SELECT keyword, col, city_name, image_name, tutor_code 
                FROM (
                    SELECT tutor_name AS keyword, 'Tutors' AS col, IFNULL(c1.city_name, '') city_name, IFNULL(ti.image_name, '') image_name, tutor_code FROM tutors AS t
                    LEFT JOIN address a ON t.address_id = a.address_id
                    LEFT JOIN city c1 ON a.city_id = c1.city_id 
                    LEFT JOIN tutor_images ti ON t.tutor_id = ti.tutor_id and ti.image_type = 'profile'
                    UNION
                    SELECT subjects AS keyword, 'Subject' AS col, '' city_name, '' image_name, '' tutor_code FROM subject
                    UNION
                    SELECT city_name AS keyword, 'City' AS col, '' city_name, '' image_name, '' tutor_code FROM city
                    UNION
                    SELECT institute_name AS keyword, 'Institute' AS col, '' city_name, '' image_name, '' tutor_code FROM institutes
                ) s
              WHERE keyword LIKE '%$queryString%' 
              LIMIT 10";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

keyword = house SELECT * FROM products WHERE description LIKE '%house%' This query also
I have this query SELECT (SELECT keyword FROM url_aliAS WHERE query = CONCAT(category_id ,
In this query, DISTINCT key word is not working. display duplicate subjects from subject
I have code like this: function search_keyword(){ $keyword = $this->db->escape_like_str(trim($_POST['keyword'])); $sql = ( SELECT
I have a MySQL query as follows: SELECT KeywordText, SUM(Frequency) AS Frequency FROM Keyword,
I have this query SELECT a.* FROM entries a INNER JOIN entries_keywords b ON
QUERY: mysql> SELECT DISTINCT (stories.id), stories.news_type, story_keywords.keyword FROM (`stories`) LEFT JOIN `story_keywords` ON `stories`.`id`
my SQL query SELECT keyword FROM table WHERE MATCH (keyword) AGAINST ('eco*' IN BOOLEAN
<?php require_once('../lankain.php'); if(isset($_POST['queryString'])) { $queryString = $dbc->real_escape_string($_POST['queryString']); if(strlen($queryString) >0) { //$query = $dbc->query(SELECT subjects
I'd like to reproduce the following SQL into C# LinqToSql SELECT TOP(10) Keywords.* FROM

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.