Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-30-2012, 07:34 PM   PM User | #1
paperino00
New Coder

 
Join Date: Nov 2011
Posts: 91
Thanks: 2
Thanked 0 Times in 0 Posts
paperino00 is an unknown quantity at this point
strstr

Hello, does this code mean if the variable $query contains "cb_session" or if the variable $admin_area is true do that ?
I say because in the code there is not variable $admin_area so it could be deleted the or condition...
Thanks

PHP Code:
if(stristr($query"cb_sessions") || $admin_area )
            
$data $this->Execute($query);
        else    
            
$data $this->CacheExecute($query); 
paperino00 is offline   Reply With Quote
Old 05-30-2012, 10:45 PM   PM User | #2
kbduvall
New Coder

 
Join Date: May 2012
Location: Maui, HI
Posts: 31
Thanks: 0
Thanked 7 Times in 7 Posts
kbduvall is an unknown quantity at this point
It means "If cb_sessions is found in $query or $admin_area equals true".
Keep in mind that if $admin_area is set anywhere, and it's set to something other than 0, false, null, or an empty string ("") it will evaluate as true.
kbduvall is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:28 AM.


Advertisement
Log in to turn off these ads.