mccollin
01 Jun 2007, 22:33
I am building a CMPS module that will let me dynamically build a page from GARS custom fields, so that I can have one page definition and generate hundreds of pages from it. I have it all working, but I need to now put in some error detection. I am passing a url value that is used to find the correct thread. If someone inputs a bogus value, then it takes me into a messy end result... here is the framework I am working with...
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
The value that is passed into $device is supposed to match one unique thread. If the value is bogus, nothing is found. How can I detect that I retrieved no rows and immediately redirect to another url without continuing the module?
Assuming I can do that, is there a way to also do the redirect if I return more than one row?
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
The value that is passed into $device is supposed to match one unique thread. If the value is bogus, nothing is found. How can I detect that I retrieved no rows and immediately redirect to another url without continuing the module?
Assuming I can do that, is there a way to also do the redirect if I return more than one row?