if statement based on sql query count results?
I have a subroutine that prints products to an html page based on the current category being viewed by the browser and everything works great however, I want to write an if statement that outputs the sql products found if there are results and a block of text if there are no results of the sql query.
I was going to do this using count in my sql query but after trying it I found that this cannot be done unless I use a group by clause.
Can anyone recommend a way to write an if/else for this situation that shows the results of the query if results are present and a block of text if the results are show nothing?
Thanks to everyone for your help.
Subject
Written By
Posted
if statement based on sql query count results?
September 11, 2006 02:53PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.