This is my first php program!



Download 6,9 Mb.
Pdf ko'rish
bet68/69
Sana26.02.2022
Hajmi6,9 Mb.
#471647
1   ...   61   62   63   64   65   66   67   68   69
Bog'liq
PHP

Performance Tuning
Before thinking much about performance tuning, get your code working. Once you
have working code, you can then locate the slow bits. If you try to optimize your
code while writing it, you’ll discover that optimized code tends to be more difficult
to read and to take more time to write. If you spend that time on a section of code
that isn’t actually causing a problem, that’s time that was wasted, especially when it
comes time to maintain that code, and you can no longer read it.
Once you get your code working, you may find that it needs some optimization.
Optimizing code tends to fall within one of two areas: shortening execution times
and lessening memory requirements.
ob_start( );
?>

Results!


Here are the results of your search:

require_once('DB.php');
$db = DB::connect('mysql://gnat:waldus@localhost/webdb');
if (DB::iserror($db)) die($db->getMessage( ));
// ...
?>

Phone List


$dd = odbc_connect (PhoneListDSN, user, password);
// disable autocommit if we're confirming
if ($submit == "Add Listing") {
$start_trans = odbc_autocommit ($dd, 0);
}
// insert if we've got values submitted
if ($submit == "Add Listing" || $submit == "Confirm") {
$sql = "insert into phone_list ([extension],[name])";
$sql .= " values ('$ext_num', '$add_name')";
$result = odbc_exec($dd, $sql);
}
?>





// build table of extension and name values
$result = odbc_exec ($dd, "select * from phone_list");
$cols = array( );
$row = odbc_fetch_into($result, $cols);
while ($row) {
if ($cols[0] == $ext_num && $submit != "Confirm") {
?>


,ch15.17090 Page 372 Wednesday, March 13, 2002 11:46 AM


This is the Title of the Book, eMatter Edition
Copyright © 2002 O’Reilly & Associates, Inc. All rights reserved.
Extension Name

Download 6,9 Mb.

Do'stlaringiz bilan baham:
1   ...   61   62   63   64   65   66   67   68   69




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish