Jump to content

Recommended Posts

Hello im trying to achieve something really fancy with my database like explained before, but i really suck with sql and i need some help please, by the way its in mysql but no one in that forum could help me so i posted here

 

table a

column common

column date

column name

column lastname

 

table b

column common

column date

column animal

column plant

column toy

 

table c

column common

column date

column electronic

 

table d

column common

column date

column vehicle

 

 

Lets say i want it to display each name and lastname of every person and display the sum of each animal, plant, toy, electronic and vehicle that each person have at a given date, even if one of them doesnt have a toy.

 

 

 

For example

 

 

 

 

 

name    lastname  animal  plant  toy    electronic  vehicle

 

peter      griffin        2            0          4          5              1

Link to comment
https://forums.phpfreaks.com/topic/235738-query-help/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.