dagon;10960667 wrote:sounds like an issue with your query not the php function to run the query.
ok here is my query:
mysql_query("Select stk_trns_d.ccode, stk_trns_d.rno, stk_trns_d.tcode, stk_trns_d.hdid,rds.hname, stk_trns_d.tdate, stk_trns_d.quantity, stk_trns_d.lot_no, stk_trns_d.dprice from stk_trns_d inner join rds on stk_trns_d.hdid = rds.hdid where stk_trns_d.ccode = '$ccode' and stk_trns_d.tdate like '%$year-$month-%'");
i use 3 variables to get the input from the user. The code and the year and date are inputs from the user.