That's quite usefull, but i suppose my problem goes a bit further.

$currentDir = (explode("/", $_SERVER["REQUEST_URI"]));
would change to:
$currentDir = (explode("/", $this->here));

it's the way i use it to make different queries depending on the
section:

                if ($currentDir[2] == ''){

                        $conditions = "(listing.date >= '$today') AND 
(listing.date <
'$nW')";
                        $fields = array('Ltype.name', 'Listing.name', 
'Listing.date',
'Venue.name');
                }else{

                        $ltypeName = substr($currentDir[2], 0, -1);
                        $conditions = "(ltype.name = $ltypeName) AND 
(listing.date >=
'$today') AND (listing.date < '$nW')";
                        $fields = array('Ltype.name', 'Listing.name', 
'Listing.date',
'Venue.name');
                }

Is it worth making $currentDir a global array?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to