This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.