hi all how to retrive data using firstname or lastname. when a user enters his firstname or lastname he will get all the details about him,but i dont know how to write or(||) in the query, my query is: select url,title,user_id from user_profile where first_name='vamshi'|| last_name='g'
I think you are saying you never know whether user inputs Firstname or Lastname. In that case you need seperate queries to match firstname and lastname. If user enters firstname go for one query else go for the other.
where first_name='vamshi' OR last_name='g'
using this would give you all the matching rows either firstname or lastname thats may not what you want.