• Post Reply Bookmark Topic Watch Topic
  • New Topic

MYSQL Query

 
anchit pancholi
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i have two table :- Products_tbl and Productdiary_tbl




i want to get price from Productdiary_tbl for latest date (so only one record i want ), if entry is not there then price will come from Product_tbl (if no record in subtable then take the record from main table) table like here product_id - 4 entry in not in Productdiary_tbl for that price will come from Product_tbl.

i used below query for get the data but i am not getting data :-




Thanks
Anchit


 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!