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

  • Home
  • SEARCH
  • 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 8694359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:46:10+00:00 2026-06-13T00:46:10+00:00

Can I write a query in MYSQL (eventually for PHP + MySQL) such that

  • 0

Can I write a query in MYSQL (eventually for PHP + MySQL) such that I can check across multiple tables in a sort of array?

For example
Suppose I have tables client, car, rate
Each table has an ID.

In client are rows … ID, Name, address
In car are rows … ID, Make, Model, Year, License plate number
In rate are rows … ID, 1-day, 2-day, 3-day

would the following work?:

SELECT name, make, model, license plate number, 1-day FROM client, car, rate WHERE make = ford

or in PHP

$q = "SELECT name, make, model, license plate number, 1-day FROM client, car, rate WHERE make = ford";

would this be correct syntax?

  • 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-13T00:46:11+00:00Added an answer on June 13, 2026 at 12:46 am

    No, you can´t. Not the way you are presenting it here. What you can do is JOINS if the tables are related to each other. Otherwise you´d probably have to select from one table at the time.

    You may also implement an iterative solution in PHP to return from several tables or consider doing it on the database side with a stored procedure.

    Normally when using a relational database there are relations between the tables so that you may perform join operations on them as such (a very loose example since I do not know anything about the context in which you are working):

    SELECT c.name, c.make, c.model, c.licensePlateNumber FROM car AS c JOIN client AS cl ON c.ClientId = cl.ClientId JOIN rate AS r ON cl.RateId = r.RateId WHERE c.make = 'Ford';
    

    Related: link

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to write a MySQL query (from PHP) that will find the newest
how can i insert in 3 different tables through one mysql query that is
How can I write a MySQL query that returns true/false (1/0 actually) based upon
How can I write a LINQ query that returns an hierachical anonymous type from
I'm interested in how I can write mysql query if I want to count
How can I write a condition such that if the row wasn't found to
I need to write a simple query in mySQL that would use MIN() in
I want to know how i can write a mysql query which checks how
I'm using mysql and I can query in both ways (or / and) That
How can i write a mySQL query where i am looking for something using

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.