Re: Curious if include_once will work better than include

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!
Include_once can't include one file several times.
I think if you use include_once PHP see if that file already were
included, and don't include it one more time...
Maybe difference is time to check this...

I don't trust this fact:
KR> Now will that speed things up compared to just using a plain "include". I call $connectionSDWIS(which is in the include) 5 different times?
-- 
Best regards,
Mikhail U. Petrov
mailto:mikhail@xxxxxxxx



Tuesday, April 13, 2004, 7:52:10 PM, Karen wrote:

KR> Curious about "include_once" versus "include".
 
KR> All my connection stuff is in "conn.php3".
 
KR> I am planning on including it at the top of the page like this:
KR> include_once "conn.php3";
 
KR> Now will that speed things up compared to just using a plain "include". I call $connectionSDWIS(which is in the include) 5 different times?
 
KR> $data = odbc_do($connectionSDWIS,"EXEC sp_SanitarySurveyLatest '$pwsno'");
KR> $data = odbc_do($connectionSDWIS, "Select Distinct CASE ActivityStatus WHEN 'A' THEN 'ACTIVE' WHEN 'I' THEN 'INACTIVE' END + ' ' + CASE Convert(varchar,ActDate,107) WHEN 'May 05, 1955' THEN ''
KR> ELSE Convert(varchar,ActDate,107) END As 'ActivityStatus' FROM Inventory Where PWSID='$pwsno'"); 
KR> $data2 = odbc_do($connectionSDWIS,"Exec sp_EntryPointsWithSourcesAndPWS '$pwsno'");
KR> $data=odbc_do($connectionSDWIS,"SELECT StateID, WSFName, TreatmentProcess, TreatmentObjective FROM Treatments WHERE PWS= '$pwsno' ORDER BY StateID");
KR> $data = odbc_do($connectionSDWIS, "SELECT CalendarYear, convert(varchar(12),ReceivedDate, 107), convert(varchar(12),CertifiedDate, 107) FROM CCRS WHERE PWS='$pwsno' ORDER BY CalendarYear Desc");

                
KR> ---------------------------------
KR> Do you Yahoo!?
KR> Yahoo! Small Business $15K Web Design Giveaway - Enter today

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux