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.

Habilidades: PHP, MySQL, JavaScript, Arquitetura de software, AJAX

Sobre o Cliente:
( 17 comentários ) Chicago, United States

ID do Projeto: #34307517

53 freelancers estão ofertando em média $13/hora nesse trabalho


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, Mais

$12 USD / hora
(532 Comentários)

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

$15 USD / hora
(265 Comentários)
(28 Comentários)
(340 Comentários)

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] Mais

$12 USD / hora
(133 Comentários)

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

$15 USD / hora
(37 Comentários)

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 Mais

$12 USD / hora
(207 Comentários)

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

$12 USD / hora
(39 Comentários)
(129 Comentários)

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 Mais

$15 USD / hora
(16 Comentários)

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 Mais

$10 USD / hora
(177 Comentários)
(57 Comentários)

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

$10 USD / hora
(105 Comentários)

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 Mais

$15 USD / hora
(13 Comentários)

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 Mais

$15 USD / hora
(24 Comentários)

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 Mais

$12 USD / hora
(27 Comentários)

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 / hora
(28 Comentários)

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 & Mais

$15 USD / hora
(29 Comentários)
(65 Comentários)

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

$10 USD / hora
(139 Comentários)