<<

. 128
( 132 .)



>>

viewing, 46“47 mediumint, bigint), 34
information testing variables for (is_int()), 113
about given discussion topic, displaying interfaces, 23, 211“212
(display_topic()), 326“329
J
functions
assigning value to configuration option joining tables
(ini_set()), 189 to copy of itself (self), 85“86
configuration option (ini_get()), 189 correlated subqueries, 86“87
loaded extensions multiple tables, 81“82
(extension_loaded()), 189 outer join, 82“85
PHP environment, guide to all queries, returning in one result set
(phpinfo()), 188 (union), 86
SAPI interface, returning two (equi-join), 80“81
(php_sapi_name()), 189
K
MySQL, 588
PHP, 628 key
inheritance, 215“218, 420“421
in array, returning all (ARRAY_KEYS()), 158
initialization code, HTML survey, 293“294 arrays, seeking (ARRAY_KEY_EXISTS()),
InnoDB, 40“41 159“160
input foreign, 19“20
concatenating (STR_REPEAT()), 139“140 primary, defined, 10, 11
HTML forms
two-dimensional arrays, 99
access key, 568 and values, exchanging (ARRAY_FLIP()),
buttons with text and image, 569 155“156
caption for grouping (legend), 569 whether exists in array
overview, 562“565
(ARRAY_KEY_EXISTS()), 158
select, multiple select, 565“566 key/value pair
Tab key (tabindex), 568 array, returning (EACH()), 161
text entry (textarea), 566“567
pulling from array and making into
text surrounded by thin line (fieldset), standalone variables (EXTRACT()),
569 153“154
insert anomalies, 8, 10 killing sessions (SESSION_DESTROY()), 485
insert queries, slashes
adding to (ADDSLASHES()), 138
L
removing (STRIPSLASHES()), 138“139
language construct, 165, 177
inserting
large strings, storing, 31“32
catalog product style (MAP_STYLE()), 429
largest argument (GREATEST), 708
data to tables, 53“55
largest integer value not greater than X (FLOOR),
date and time into columns, 35
703
748 Index

last array element, return and remove literal patterns, 659“660
(ARRAY_POP()), 160 logarithm
leading and trailing spaces, removed (TRIM), base-10 (LOG10), 705
715“716 e raised to the power of X (EXP), 704
leading spaces, removed from string (LTRIM), natural logarithm (LOG), 705
715 logging
leaving out empty properties (DATA_FIELDS()), error functions (error_log()), 186“187
418 Flush activities, 591
leftmost len characters (LEFT), 713“714 logical operator, 123
left-padded string (LPAD), 713 loops, 127“132
len characters, 713“714 lowercase
length, string functions, 712 characters, changing to (LCASE), 718
level string, changing to (STRTOLOWER()), 141
errors displayed and logged, 333 lowest values, removing (min() function), 78
threaded discussion, simplifying
M
(push_handler() and pop_handler()),
337 M remainder of # divided by (MOD), 703
library, Guestbook 2003 Macintosh, 557, 575“578
arguments, printing MacSQL, 50“52
(PRINT_INPUT_FIELDS()), 249“250 mailing lists, 692, 695“696
database call, putting together malicious text, barring (CLEANUP_TEXT()), 239
(SELECT_ENTRIES()), 253“254 many-to-many relationships, 17“19
disconnecting (MYSQL_DBCONNECT()), mappings, retrieving catalog
242“243 (LIST_MAPPED_STYLES()), 426“428
navigational elements, creating (NAV()), match
254“255 array, returning (PREG_GREP()), 147
printing query (PRINT_ENTRY()), 248“249 field value, getting all (FETCH_ALL()), 417
user authentication string to a pattern (PREG_MATCH_ALL()),
(GUESTBOOK_AUTHENTICATE()), 148
244“248 testing string (ereg()), 143“144
verifying user information mathematical functions
(CREATE_ENTRY()), 250“253 arc cosine (ACOS), 706
writing safe queries arc sine (ASIN), 706
(SAFE_MYSQL_QUERY()), 243“244 arc tangent (ATAN), 706
limited potential values (enum), text strings, arc tangent of two arguments (ATAN2), 707
storing, 32 base-10 logarithm (LOG10), 705
line, single, 172“173 BC, 640
Linux, CD, back-of-the-book, 557 cosine (COS), 706
list cotangent (COT), 707
of catalog fields (FIELDLIST()), 417“418 dates (DATE_ADD), 723“725
of categories or specific products, printing described, 628“632
(DISPLAY.PHP), 492“493 difference of months in period
of databases (show databases), 45 (PERIOD_DIFF), 723
listing e raised to the power of X (EXP), 704
catalog products mappings largest argument (GREATEST), 708
(LIST_MAPPED_STYLES()), 426“428 largest integer value not greater than X
children, catalog products class, 423“424 (FLOOR), 703
unmapped root-level catalog styles months, adding to period (PERIOD_ADD),
(LIST_UNMAPPED_STYLES()), 425 722“723
Index 749

natural logarithm (LOG), 705 MyISAM, 39“40
negative or positive (SIGN), 702 MySQL
non-negative square root (SQRT), 705 checking for alive and running, daemon,
pi, approximating, 705 588
raising to power of Y (POW), 705 PHP functions, 179
random floating-point value (RAND), 707 resources, 695“696
remainder of # divided by M (MOD), 703 MySQL Control Center, 50
rounding to integer and specified number of mysqldump, 591“595
decimal places (ROUND), 704
N
segments, 708“709
sine (SIN), 706 name
smallest argument (LEAST), 707“708 absolute pathname, returning (REALPATH()),
smallest integer value not greater than X 175
(CEILING), 703 catalog table, returning (FETCH_SIMPLE()),
tangent (TAN), 706 415“416
truncating to D decimals (TRUNCATE), 704 of class, returning (get_class()), 164
X, absolute value of, 702 database
MD5 checksum, calculating string, functions creating, 26“27
(MySQL), 732 current, 730
measuring string (ELT), 718 directory
merging arrays (ARRAY_MERGE()), 156 character separating
message, sending error (trigger_error() and (path_separator()), HTML survey,
user_error()), 187 292
method returning (DIRNAME()), 174
defined, 209 file, creating (TEMPNAM()), 174
object/class functions, whether defined index, 37
(method_exists()), 164 of month, 721
overloading (__GET() and __CALL()), state, assigning, 670
430“431 tables, changing, 41“42
static variables, using (DBH()), 413“414 username, current, 731
Microsoft Windows. See Windows (Microsoft) and value of all defined constants
Midgard project, 694 (get_defined_constants()), 149
minimum value/maximum value, returning variable, defining (define()), 149
random number (mt_rand()), 178 weekday (DAYNAME), 721
Monday, week beginning (WEEKDAY), 720 natural logarithm
month e raised to the power of X (EXP), 704
day of, 720 function (LOG), 705
difference of in period (PERIOD_DIFF), 723 navigational elements, Guestbook 2003 library,
full name of, 721 254“255
moving file, after checking uploaded negative number (SIGN), 702
(MOVE_UPLOADED_FILE()), 175 Netscape tag references, 696
multiple conditions, 125“127 new project, creating, 545
multiple occurrences, regular expressions, new record, creating (CREATE_RECORD()), 419
663“665 newline operator
multiple select, HTML form input, 565“566 errors, 196
multiple tables, deleting data, 60 HTML break, adding after (NL2BR()),
multiple while loop, 129 141“142
multi-statement transaction (TRANSACTION()), non-negative square root (SQRT), 705
421“422
750 Index

normalization functions
multi-column primary keys (second normal described, 163“164
form), 11“13 determining (is_object()), 164
table structure (first normal form), 10“11 method, whether defined
transitive dependencies (third normal form), (method_exists()), 164
13“14 testing for (is_object()), 114
notes, adding to catalog products, 424“425 type other than, testing for (is_scalar()),
notifying survey winner (admin/winners.php), 114
303“304 object-oriented programming
NULL value catalog code, 408
allowing or forbidding, 28 classes, 210“218
checking content for (nullop()), 373“374 described, 209“210
E-NOTICE level error message, 92 destructors, 219
flow control based on, 701“702 exceptions, 219“220
outer joins, 82“85 object cloning, 218“219
tables, 24“25 theory, 410“411
variables, testing for, 113 octal value (OCT), 710
number of rows in each group, counting one-to-many relationships, 15“16
(count() function), 74“77 one-to-one relationships, 16“17
numbers one-way hash of string, returning (CRYPT()),
columns, storing 139
decimals as characters (decimal), 35 opening tags, HTML forms (form), 561“562
described, 33 or
double-precision floating-point (double/ bitwise of all bits in expr (BIT_OR), 733
doubleprecision/real), 35 regular expressions, specifying, 665
floating-point (float), 34“35 Oracle database, 3“4, 19
integers (int/integer, tinyint, order
mediumint, bigint), 34 of columns, 42
converting of rows, specifying, 73
bases (CONV), 710 shopping cart, 491“492
floating-point to formatted string OS X, 575“578
(NUMBER_FORMAT()), 154 outer join, tables, 82“85
random, generating, 177“178, 632 output buffering, 187“189
variable functions, testing (is_array(), outputting
is_numeric(), and is_string()), 148 argument string and then terminating script
NuSOAP (die()), 176
application goals, determining, 527“528 image in PNG format (IMAGEPNG()), 182
Babelfish application, 532“534 overloading methods (__GET() and __CALL()),
Barnes & Noble application, 528“531 430“431
described, 524“526
P
server application, writing, 534“535
service call, sample, 526“527 pages, maintaining state between. See session
NuSphere, 572 paragraph, HTML, 672
parser, 194, 508“509
O password
object form field, 674
cloning, 218“219 function, 731
determining (is_object()), 164 getting from browser or verifying against
database table (authenticate()), 669
Index 751

guestbook, verifying, 257“258 functions
strings, encrypting and decrypting, 732 arguments, 134“135
validation, content-management system array, 155“163
(connect_validate_login()), date/time, 166“170
374“375 described, 133
path documentation, 136“137
absolute pathname, returning (REALPATH()), error, 186“187
175 file system, 170“175
elements, cutting off all but base form, 134
(BASENAME()), 175 HTTP header, 179“181
including, 582 image, 181“184
pattern matching MySQL, 179
case-insensitive (split()), 155 object/class, 163“164
replacing string based on complex output buffering, 187“189
(EREG_REPLACE()), 144“145 print, 164“166
to series of known characters, 659“660 random number generator, 177“178
string (PREG_MATCH_ALL()), 148 regular expression, 142“148
wildcard characters (LIKE and NOT LIKE), return values, 135“136
697 script control, 175“177
Payflow Pro functions, 651 session, 179
PCRE (Perl-compatible regular expression) string handling, 137“142
array of matched subpatterns, assigning URL, 184“186
(PREG_MATCH()), 147 variable, 148“155
array, returning match (PREG_GREP()), 147 information functions, 628
benefits of using, 146 resources
functions, 633“634 mailing lists, 692
replacements (PREG_REPLACE()), 147 Midgard project, 694
string for matches to a pattern PEAR, 693“694
(PREG_MATCH_ALL()), 148 Phorum discussion server, 694
PDF functions, 651“658 PHPBuilder, 693
PEAR (PHP Extension and Application PHPclasses, 694
Repository) phpMyAdmin on Sourceforge, 693
connection, database (db_connect()), 670 php.net Web site, 691
described, 224, 361“365 Web-development site, 694
functions, 693“694 Webmonkey Web site, 695
persistent connection, content-management zend.com Web site, 692“693
system (db_connect()), 365“368 scripts
Perl regular expression string, transforming browser-passed variables, accessing,
into array (PREG_SPLIT()), 152“153 100“107
Perl-compatible regular expression. See PCRE built-in variables, 108“112
phone number, identifying customer by, testing variables, 112“114
457“459 variable types, changing, 114“115
Phorum discussion server, 694 variable variables, 115“116
PHP variables, assigning simple, 91“99
control structures tags
conditions, checking against multiple removing (cleanup_text()), 669
(switch...case), 126“127 removing from string (STRIP_TAGS()),
if statement, 117“126 137“138
loops, 127“132 variables, creating (SESSION_DECODE()), 485
environment, guide to all (phpinfo()), 188 version, 188
752 Index

PHP Extension and Application Repository. privileges, Flush, 591
See PEAR problems, data-storage methods. See anomalies
phpdev bundle, 571“572 problem-tracking system
pi, approximating, 705 blocking, needed, 444
picture. See image code overview, 452
placeholders, 369 customer ID (fetch_customer()), 454“455
PNG image format, 182 customer, identifying by phone number or
popup form field, 675 email address (find_customer()),
position 457“459

<<

. 128
( 132 .)



>>