index_C

C

Calc_Price function, cart.cgi, 407

_callback function, soap_server.cgi, 306–307

$caller variable, 82

caret (^), regular expressions, 57, 203

carriage return, 57, 305

cart.cgi

BasicSession module, 405

Calc_Price function, 407

cart_total.tmpl template, 408

catalog_footer.tmpl template, 408

catalog_header.tmpl template, 407

CGI module, 405

Get_Product_List method, 406

Get_Session function, 405

output, 404

overview, 403

param function, 406

Print_Page function, 407–408

program listing, 415–417

SOAP::Lite module, 405

soap_server19.cgi, 406

sprintf function, 408

strict module, 405

cart_total.tmpl

cart.cgi, 408

program listing, 419

catalog listing, catalog.cgi (shopping cart program), 397

Catalog package, soap_server.cgi, 301–302

catalog.cgi (product catalog program)

CGI module, 309

Get_Products_List method, 309

header function, 309

here document, 310

item_details.cgi, 310

output, 308

overview, 308

program listing, 317

results method, 309

SOAP::Lite module, 309

strict module, 309

taint switch, 309

warnings switch, 309

catalog.cgi (shopping cart program)

BasicSession module, 398

catalog listing, 397

catalog_footer.tmpl template, 400

Get_Products_List method, 399

Get_Session function, 398

param function, 398

Print_page function, 398–399

program listing, 413–414

qq block, 400

result method, 399

SOAP::Lite module, 398

soap_server19.cgi, 399

strict module, 397

catalog_footer.tmpl

cart.cgi, 408

catalog.cgi (shopping cart program), 400

catalog_footer.tmpl (shopping cart program), program listing, 419

catalog_header.tmpl

cart.cgi, 407

program listing, 420

Catalog::input variable, soap_server.cgi, 304, 306

<catalog_item> XML tag, soap_server.cgi, 305

cell, spreadsheet, 5

CGI. See Common Gateway Interface module

CGI module

BasicSession.pm, 256

cart.cgi, 405

catalog.cgi, 309

importance of, 105

index.cgi (auction program), 185

index.cgi (photo album program), 442

index.cgi (user registration program), 255

item_details.cgi (product catalog), 312

item_details.cgi (shopping cart program), 401

phonebook.cgi, 118

signup.cgi, 248

view_all.cgi, 188

view_item.cgi, 196

/cgi-bin/ directory, 106

CGI::Carp module, phonebook.cgi, 118

CGI.pm module, phonebook.cgi, 118

Change_Record subroutine, 72

CHAR data type, 5

character class, regular expression, 202

checkbox type, <input> tag, 108

Check_Data function, view_item.cgi, 199, 201

Check_Fields function, signup.cgi, 249, 252

checking for text data, view_item.cgi, 202–203

chk_del_person subroutine, graphical phonebook application, 362, 378

chk_del_phone subroutine, graphical phonebook application, 364, 378

chomp function, 70, 75

CLEAR method, BasicSession.pm, 257

Close button, creating, graphical phonebook application, 370

closed_tmpl, view_item.cgi, 199

code example

add_questions.cgi, 169–171

add_table.pl, 35

admin.cgi, 466–470

auction_up.cgi, 241–242

cart.cgi (shopping cart program), 415–417

catalog.cgi (product catalog program), 317

catalog.cgi (shopping cart program), 413–414

command-line phone number lookup program, 383–384

command-line phonebook program, 380–383

comprehensive example, 97–101

connect_multi.pl, 25–26

create_test.cgi, 171–172

database tables, Quizzer application, 168

display_image.cgi, 243–244

generate.pl, 459–462

graphical phonebook program, 384–393

index.cgi (auction program), 217

index.cgi (photo album program), 463–466

item_detail.cgi (product catalog program), 318–319

item_details.cgi (shopping cart program), 415

MySQL tables, auction application, 215–217

photo_dumper.pl, 296–298

Quizzer.pm, 176–180

report_graphic.pl, 341–343

report_html.pl, 339–341

report_text.pl, 338–339

score_test.cgi, 172–173

SELECT statement, 59–66

signup.cgi, 267–268

simple add, 94–95

simple delete, 97

simple update, 95–96

SmallAuction.pm, 223–226

soap_server.cgi, 315–316

take_test.cgi, 173–175

test_chooser.cgi, 175–176

transaction.pl, 283

upload.cgi, 242–243

view_all.cgi, 217–220

view_item.cgi, 220–223

Web phonebook application, 165–168

colors, alternating in tables, 191

cols attribute, <textarea> tag, 109

column

database table, 4

name, 4–5

types, 5

column attribute, grid method, 88

column type

BIGINT, 5

BLOB, 5, 29

CHAR, 5, 29

DATE, 5, 29

DATETIME, 5

DOUBLE, 5

FLOAT, 5

INTEGER, 5, 29

REAL, 29

SMALLINT, 5, 29

TIME, 5, 29

TIMESTAMP, 5, 29

VARCHAR, 5, 29

command attribute, 88

command-line phone number lookup program

DBI module, 356

die function, 356

disconnect function, 359

here document, 357

name validation, 357

overview, 356

prepare function, 358

program listing, 383–384

quote function, 357

SELECT statement, 357

shift function, 356

strict module, 356

command-line phonebook program

add_person subroutine, 351, 353

add_phone subroutine, 355

DBI module, 349

disconnect function, 350

execute function, 354

get_person_id subroutine, 351

global variables, 349

hash-slice, 353

input_person subroutine, 351

input_phone subroutine, 354

INSERT statement, 350, 353

map function, 353

output, 355

overview, 348–349

person table, 350

primary key, 355

program listing, 380–383

$Query_statement variable, 352

reinputting required fields, 355

SELECT statement, 352

strict module, 349

commit method, 515

Common Gateway Interface (CGI) module

add_questions.cgi, 169–171

admin.cgi, 466–470

auction_up.cgi, 241–242

cart.cgi (shopping cart program), 415–417

catalog.cgi (product catalog program), 317

catalog.cgi (shopping cart program), 413–414

create_test.cgi, 171–172

display_image.cgi, 243–244

importance of, 105

index.cgi (auction program), 217

index.cgi (photo album program), 463–466

item_detail.cgi (product catalog), 318–319

item_details.cgi (shopping cart program), 415

score_test.cgi, 172–173

signup.cgi, 267–268

soap_server.cgi, 315–316

take_test.cgi, 173–175

test_chooser.cgi, 175–176

upload.cgi, 242–243

view_all.cgi, 217–220

view_item.cgi, 220–223

compass directions, grid method, 88

compiling, SQL statement, 39

concatenation operator (.), 70, 86

config.sh, 486

connect method

index.cgi, 186

Perl script example, 19–20

report_text.pl, 324

syntax, 515–516

view_all.cgi, 189

view_item.cgi, 197

connecting to database

database handle, 19

$dbh variable, 19

multiple connections, 21

Perl script example, 19–20

connect_multi.pl, 25–26

consistency, data structures and values, 3

Content-Type header, create_test.cgi, 131

cookie

tracking, 245

tracking user between pages, 398

cookie function

BasicSession.pm, 264

score_test.cgi, 147

take_test.cgi, 143

correct input box, add_questions.cgi, 134

count, database records, 45–46

COUNT function, SELECT statement, 45–48

$counter variable, 44

CPAN module, 498

CREATE TABLE

MySQL, 38

person table, 348

phone table, 348

SmallAuction.pm, 213

syntax, 34, 321, 504

create_test.cgi

Content-Type header, 131

header function, 131

here document, 132

my variable, 131

mysql_insertid MySQL function, 131

program listing, 171–172

strict module, 130

taint mode, 130

cron program, 323

CSV, data source name, 20

curly brackets ({ }), 34

currency, column types related to, 5

currency format, 197

CURRENCY type, 203

current directory, 184

Curses library, 79



Perl Database Programming
Perl Database Programming
ISBN: 0764549561
EAN: 2147483647
Year: 2001
Pages: 175

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net