I think you can use the models method getNumRows() which returns the number of rows returned in the last query! Enjoy, John
On Oct 16, 12:19 am, "Dave Maharaj :: WidePixels.com" <[email protected]> wrote: > If you have posts 1, 2, and 3 for example and you type in view/4 and there > is no 4 the page still renders but it has no data. How can you prevent this > ? > > I have > > if ($this->Post->validPost($id) == true) { > > which checks the DB for that id if found then do as normal > > } else { > > return them back to index > > } > > Is there an easier way to do that that i over looked? > > Thanks, > > Dave --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
