depends on your table structure ...
select * from perscriptions_temp where user_id ='$user_id' and max(rp_id)='$user_id'
first, max() must be in a sub-select (as I posted).
second, max() only works with number fields:
for example:
select name from product where price=(select max(price) from product)
this will get the product(s) with the highest price. note that price is a number value.