These are three tables
1. table `p_transactions` has following fields
(`txn_id`, `txn_uid`, `txn_bid_no`, `txn_date`, `txn_desc`, `txn_amt`, `txn_fee`, `txn_mode`, `txn_status`, `txn_mdate`)
2 . table `p_game_results` has following fields.
(`id`, `game_id`, `game_combo`, `game_combo_hr`, `cdate`, `mdate`)
3. Table `p_game_room_results` has following fields
(`id`, `game_id`, `room_id`, `txn`, `round`, `result`, `score`, `cdate`, `mdate`)
I would like to join them using their txn id as a common field.
here's something I tried. but not sure, I'm sure its wrong .
$sql = "SELECT * FROM " . $prefix . "_user_game_results".$prefix."_game_room_results".$prefix."_transactions WHERE". $prefix . "_user_game_result.uid"='$prefix."_game_room_results.id"'. and .$prefix."_transactions.txn_uid"='$prefix."_game_room_results.uid"'"";
$result = $this->sql_fetchrowset($this->sql_query($sql));
Thanks.