FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » fetching value from related multiple rows & columns in PHP SQL
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
fetching value from related multiple rows & columns in PHP SQL [message #182521] Sat, 10 August 2013 05:50 Go to previous message
vikas daiya is currently offline  vikas daiya
Messages: 2
Registered: August 2013
Karma:
Junior Member
I have database as follows. using SQL, PHP

Code Period Period2 type amount
14 4 2013 TP 500
14 5 2013 TP 300
14 6 2013 TP 175
13 4 2013 TP 150
13 5 2013 TP 50
13 6 2013 TP 250
12 7 2013 TP 110


I want to create a form with combos having

which will fetch values as follows.

code > period > period2 > type > amount

14 > 4 > 2013 > TP > 500

and so on.... same need to be updated / inserted in new table.

note: amount is related to type which is related to period2 which is related to period under code.

means under code "14" there are three values "4,5,6" under this there is one value "2013" (default) and "TP" (default) and amount under this there are values "500,300,175" so when code is sleeted i.e "14" then values 4,5,6 should fetched and then "2013" then "TP" but when period is selected i.e 5 then amount of 5 300 should be fetched.

kindly help me out to solve this query.
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Counter reset or not? UPDATE
Next Topic: Re: Counter reset or not?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 05:29:03 GMT 2024

Total time taken to generate the page: 0.03705 seconds