Need PHP JSON Help With a Function That Combines 4 tables into one Product Object/Array

Hi there. I have an E-Commerce project and I need help combining 4 mysql tables into a function that outputs all the products (we actually already have a function made, but it's not fully working).

I'm attaching an example of the API function's output which we are trying to re-create (and base this function on) - basically, we import the product data, so we can list the products from our local mysql database which is way faster than pulling the products from the API.

The API example in my screenshot has lots more data than we actually need for the local version, so in the attached screenshot - just look at the "variations" part of it - that's what I need to add - and like I said I already have a function that works, but it's missing that part. I can give you access to it (VPS, PHP, MySQL).

My Tables:



Modifier Lists



Product: Coffee

Variations: Large - $4.50 | Medium - $3.50 | Small - $2.50

Modifier Lists: Milk/Cream, Flavor, Sweetener


Milk/Cream: 2%, Whole, Skim, Coconut Milk

Flavor: Vanilla, Hazelnut, Mocha

Sweetener: Sugar, Coconut Sugar, Sweetener

That structure makes up a product. Right now the Modifiers and Variations aren't outputting, but I'm more concerned with fixing the Variations first - then we can fix the Modifiers after.

Also there is either a location_id or item_id in every table and that's how you can bind/link all the different parts of the products.

So first you could do select * from products where location = $any_location_id

Then that would return all our products and then I think we also have the location in the variations table too plus we can link them on the item_id (note: we have lots of locations in the table so using the location id keeps the query result limited to only the products for one location/shop).

I can't remember what modifiers has but it's very easy to see what binds each table once you look at the table.

Compétences : PHP, MySQL, JavaScript, Architecture Logicielle, AJAX

Concernant le client :
( 17 commentaires ) Chicago, United States

Nº du projet : #34307517

52 freelances font une offre moyenne de 13 $/heure pour ce travail


Greetings, You are chatting with Raman. Trust me we are expert at php json with a function that combines 4 tables into one product object/array. Our team is expert at this work. We completed more than 20+ Database, Plus

$12 USD / heure
(538 Commentaires)

is it php? can you tell if there is any framework/cms?

$15 USD / heure
(267 Commentaires)
(28 Commentaires)
(343 Commentaires)

Hello Kenneth D., We would like to grab this opportunity and will work till you get 100% satisfied with our work. We are an expert team which have many years of experience on Software Architecture [login to view URL] Plus

$12 USD / heure
(133 Commentaires)

Hi, Hope you are doing great. I am an experienced web developer. I have 8+ years of experience in webdesign/d Plus

$15 USD / heure
(37 Commentaires)

Hi I will write query to combine all 4 tables and fetch result. I know PHP, MYSQL, AJAX, javascript , jquery , css, html very well. PLEASE HAVE A LOOK AT MY PROFILE FOR MORE ABOUT MY RATING AND REVIEWS I have 13+ y Plus

$12 USD / heure
(208 Commentaires)

Hi there, I'm the best here! Would love to work together. Thanks!

$12 USD / heure
(40 Commentaires)

Hello, this is Koki from Japan who has been working with PHP, JavaScript, Ajax, MySQL for over 8 years now I have checked your project description carefully and I think that I can help you to complete this project full Plus

$15 USD / heure
(16 Commentaires)
(132 Commentaires)

Hello there, *****I CAN START WORK ON IT IMMEDIATELY.***** Thanks for the opportunity. It is my pleasure to be able to bid on your project. Really very much interested to have this project if you permit. I went throug Plus

$15 USD / heure
(16 Commentaires)

Hello Project ID: 34307517, This is Shivam, I am a professional web developer and have been working in this field for 7 long years. Your requirements are fully clear to me and I am applying only because I meet all the Plus

$10 USD / heure
(177 Commentaires)
(60 Commentaires)

Hello. First receive warm greetings, and hoping you are good. Thanks for your job posting. I am a Full stack developer in having 7years experiences in websites' development. I have worked with PHP, JavaScript, Ajax, Re Plus

$12 USD / heure
(28 Commentaires)

I've gone through your project details and understood it. I am available to start work immediately and I'll provide full satisfaction and best price. I hope to work with you. Thanks for reading me.

$12 USD / heure
(29 Commentaires)

I have read all description. I will combine 4 tables into 1 array. Give me chance to show you good result. Thanks.......

$10 USD / heure
(110 Commentaires)

Dear Client! I have a lot of experience in php. If you give me the assignment, I will satisfy you with good results. because I am a full-time developer, you can contact with any time. I am focusing on Trust & Credit to Plus

$15 USD / heure
(26 Commentaires)

Hello. I am ready to start work right now. I am very familiar with wordpress, woocommerce website building and theme & plugin customization, Child theme development, payment gateway & API integration, custom widget & Plus

$15 USD / heure
(33 Commentaires)
(65 Commentaires)

Hi I have vast exp in php and jquery and can start your job righ tnow thanks bilal

$10 USD / heure
(143 Commentaires)