Title: ????????????????????????????? ??????????????? PHP
1???????????????????????????????????????????? PHP
2???????????????
- ??????????????????????????????????? PHP
- ?????????????????? PHP ?????????????????? MYSQL
??? - ??????????????????????????????????????????????
- ??????????????????????????????????????????????????
??????? Web Application
3????????????
- ?????? 12 ?????????? 2550
- ?????????????? , ?????????? AppServ, ??????????
Eclipse - ?????? 13 ?????????? 2550
- ???????????????????????? ?
- ?????? 14 ?????????? 2550
- ???????? Web Form, ?????????????????, phpMyadmin
- ?????? 15 ?????????? 2550
- ???????????????????? ITIL
- ?????? 16 ?????????? 2550
- ???????????????????? ITIL
4Download ??????????????????????
- ????? Folder ???? c\php_train
- ftp//ftp.nso.go.th/public/Training/PHP_2550
- ???????????????? Tools ???????????????????? Save
Target As ?????? c\php_train - ???????????????? PHP ???????????????????? Save
Target As ?????? c\php_train
5 6?????????????????????????????
- ??????????????????? ?????????? (Algorithm)
?????????????????? (Data Structure) - ???????????????????????????????????? (Software
Engineering) - ??????????????????? HTML, XHTML, CSS, DOM,
JavaScript, XML - ??????????????????????????????????????????? ????
Application Server , Framework, Programming - ?????????????????????????????????????????
(Programming Language) - ??????????????????????????????????????????????????
???? (Web Application Security)
7Web Application Model
8Web Application Deployment
- App Server
- Apache Web Server
- PHP
- Browser Client
- HTML,CSS,XML
- DOM
- Java Script
- Java Applete
9?????????????? 3-Tier
10??????????????????? MVC
11MVC Model
- VIEW
- ???????????????????? ???? images, CSS,JS,XX.php
- Control
- Action
- config
- Model
- business
- Database
- metadata
12W3 Schools
13Certificate
14HTML Document
- lt!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http//www.w3.org/TR/html4/strict.dtd"gt
- ltHTMLgt
- ltHEADgt
- ltTITLEgtMy first HTML documentlt/TITLEgt
- lt/HEADgt
- ltBODYgt
- ltPgtHello world!
- lt/BODYgt
- lt/HTMLgt
-
15What Is XHTML ?
- XHTML stands for EXtensible HyperText Markup
Language - XHTML is aimed to replace HTML
- XHTML is almost identical to HTML 4.01
- XHTML is a stricter and cleaner version of HTML
- XHTML is HTML defined as an XML application
- XHTML is a W3C Recommendation
16XHTML
- lt!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Strict//EN" "http//www.w3.org/TR/xhtml1/DTD/xhtml
1-strict.dtd"gt - lthtmlgt
- ltheadgt
- lttitlegtsimple documentlt/titlegt
- lt/headgt
- ltbodygt
- ltpgta simple paragraphlt/pgt
- lt/bodygt
- lt/htmlgt
17What is xml ?
- XML stands for EXtensible Markup Language
- XML is a markup language much like HTML
- XML was designed to describe data
- XML tags are not predefined. You must define your
own tags - XML uses a Document Type Definition (DTD) or an
XML Schema to describe the data - XML with a DTD or XML Schema is designed to be
self-descriptive - XML is a W3C Recommendation
- http//www.w3schools.com/xml/xml_examples.asp
18Style Sheet
- ?????? presentation style ??? document
??????????????????? documents. - CSS simplifies Web authoring and site maintenance
such as the text ,the backgrounds, the font size
and style. -
- http//www.w3schools.com/css/default.asp
19JavaScript
- JavaScript is a scriping language designed for
adding interactivity to HTML pages - JavaScript is an interpreted language .
- ltscript language"JavaScript"gtlt!--
document.write("This text is written using
JavaScript!")//--gtlt/scriptgt -
20DOM (Document Object Model )
http//www.w3schools.com/htmldom/default.asp
21Object Collection
22Object Methods
23Object Properties
24SDLC
25UML Diagram
Sequence Diagram
Class Diagram
26UML (Unified Modelling Language )
- Use case
- Class Diagram
- Object Diagram
- Sequence Diagram
- Collaboration Diagram
- State Diagram
- Deployment Diagram
27PHP and the OWASP Top Ten Security
Vulnerabilities
- Unvalidated Parameters
- Broken Access Control
- Broken Account and Session Management
- Cross-Site Scripting (XSS) Flaws
- Buffer Overflows
- Command Injection Flaws
- Error Handling Problems
- Insecure Use of Cryptography
- Remote Administration Flaws
- Web and Application Server Misconfiguration
28 29ITIL Requirement Statement
- ????????????????????????????????????????????????
??????????????????????????????????????????????????
?? ???????????????????????????????????????????????
???????????????????????????????
??????????????????????????????????????????????????
??????????????????????? ??????????????????????????
???? ???????????????????????????????? - ????????????????????????????????????????????????
???????, ?????????? ??? ??????????? Support
30Development Process
31Tools
- Analysis Phase
- Capture Requirement Use case Diagram
- Business Process Activity Diagram
- Object Domain Class Diagram
- Design Phase
- Input Output Design Class Diagram, Prototype
- Database Design E-R Diagram, Class Diagram
- Software Structure Deployment Diagram
32Use Case
33Class Diagram
34 35AppServ Open Project
36AppServ v 2.5.7
37?????????? App Server v 2.5.7
- ??????????????????? appserv-win32-2.5.7.exe
- ????????????? C\AppServ
- ???????????????
- C\AppServ\Apache2.2
- C\AppServ\Mysql
- C\AppServ\PHP5
- C\AppServ\WWW
- ??????????????? http\\localhost
- ?????????????????????????????
- C\AppServ\WWW
38Security Warning
39Welcome
40Backup Old Data
41License Agreement
42Folder ??????????
43Select Component
44Server Information
localhost
email_at_nso.go.th
45MySQL Server
passw0rd
tis620
46??????????
47?????????????????
48??????????????????????????
49http//localhost
50PHP.INI
51Uninstall
52- ?????????? IDE
- eclipse 3.1
53???????????????????? eclipse 3.1
- jdk-1_5_0_07-windows-i586-p.exe
- eclipse-SDK-3.1.2-win32.zip
- dbg-2.15.1-win32-php516.zip
- PHPEclipse1.1.3-2005-01-29.zip
- net.sourceforge.phpeclipse_1.1.8.bin.dist.zip
54????????????????? eclipse 3.1
- ??????? JDK
- extract ???? eclipse-SDK-3.1.2-win32.zip ????????
c\eclipse - extract ???? net.sourceforge.phpeclipse_1.1.8.bin.
dist.zip - ???????? c\eclipse
- extract ???? PHPEclipse1.1.3-2005-01-29.zip
???????? c\eclipse - extract ???? dbg-2.15.1-win32-php516.zip
?????????????? php_dbg.dll ??????????????
c\appserv\php5\ext
55????????????????? eclipse 3.1 (???)
- ????????? C\WINDOWS\php.ini ??????????? notepad
?????? - ???????? extension
- extensionphp_dbg.dll ????????????? extension
- ????????????
- debugger
- debugger.enabled on
- debugger.profiler_enabled on
- debugger.JIT_host clienthost
- debugger.JIT_port 7869
- debugger.hosts_allow localhost 127.0.0.1
- debugger.hosts_denyALL
- debugger.ports7869, 10001, 10002, 10003,
10000/16
56????????????????? eclipse 3.1 (???)
- ????? Stop Apache ???? Start ????
- ????? phpinfo
57Eclipse Concept
- Workspace (???? .metadata)
- Perspective (??? PHP ??? Debug)
- View
- Editor
58New
- ????? Project ????
- File-gtNew-gtPHP Project
- ????? PHP File ????
- File-gtNew-gtPHP File
- ????? HTML ????
- File-gtNew-gtHTML File
59New Project
60New PHP File
61???????? Config ????? Run/Debug Program
- ?????????????? Project ?? Navigator View-gtRun
As-gtRun - ????? PHP DBG Script
- ????? , ??, ????? Config ???
- ??? Tab File ????????
- Project , File ?????????? Run
- ????????????? Browse
62???????? Config ????? Run/Debug Program
- ????? Tab ???? PHP Environment ?????
- Tab ???? Interpreter ????????? New ??????????
c\AppServ\php5\php.exe - Tab ???? Remote Debug -gt ???????????? 3
63???????? Config ????? Run/Debug Program
- ????? Tab ????Common ???????? mark ??? Run ???
Debug
64 65Rasmus Lerdorf
http//lerdorf.com/bio.php
66PHP History Version
- PHP/FI (Personal Home Page / Forms Interpreter)
2538 - PHP 2.0 (PHP/FI 2.0)
- PHP 3.0
- PHP 4.0 (4.4.4)
- PHP 5.0 (5.1.6)
67PHP Reference
- http//www.w3schools.com/
- http//www.php.net
- http//www.phpfreaks.com
- http//www.tizag.com
- http//th2.php.net/manual/en/language.types.php
68What is PHP ?
- PHP is a server-side scripting language, like ASP
- PHP scripts are executed on the server
- PHP supports many databases (MySQL, Informix,
Oracle, Sybase, Generic ODBC, etc.) - PHP is an open source software (OSS)
- PHP is free to download and use
69What is a PHP File?
- PHP ?????????? HTML tags ??? PHP Tag
(lt?php .. ?gt ) - PHP ?????????????????? HTML
- PHP ????????????? .php
70??????????? PHP Interpreter
71PHP Example
- lthtmlgt
- ltheadgt
- lttitlegtPHP Examplelt/titlegt
- lt/headgt
- ltbodygt
- lt?php
- echo "Hi, I'm a PHP script!"
- ?gt
- lt/bodygt
- lt/htmlgt
72PHP Tag Style
- ?????? 1 SGML Style lt? ... ?gt
- ?????? 2 XML Style lt?php ... ?gt
- ?????? 3 JavaScript Style
- ltscript language"php"gt
-
- lt/scriptgt
- ?????? 4 ASP or JSP Style lt gt
-
73??????????????????????????????
- ??????????????????????
- ??????????????
- ???????????????
- Syntax ???
- Logic ???
74Coding Tips
- Indentation and Spacing
- ???????????????? ??? Space ???????????????????????
??????? ???? - lt?php if(is_dir(directory))function() ?gt
??????? - lt?phpif ( is_dir(directory) ) function
() - ?gt
- Variable Naming ?????????
- variable_name ???? first_name, last_name
- Function Naming ?????????
- VariableName ???? GetText()
75Coding Tips (continue)
- Magic Numbers
- ??? if (status 3) ??????????????
- define ('DELETED', '3')
- if (status DELETED)
- Single or double quotes
- first_name ????????? first_name
- ?????????????????????? single quote
?????????????????????????????????? - Brackets
- ?????? ?????????????????????????????????????
??????
76Flowchart ??? Pseudocode
pseudocode sum 0 count 1 REPEAT IF
count is even THEN sum sum count count
count 1 UNTIL count gt 20 DISPLAY sum
77 78 ????????(Comment)
- Single line -gt //
- ???? // Connect To Database
- Multiple line -gt /
- ..
- ..
- /
- Shell-Style -gt .
79?????? (Variable)
- ??????????????????????????????????????
- ?????????????(Type Of Variable)
- ??????????????? (Scope Of Variable)
80????????????????? (Variable )
- ?????????????????? ?????????? ???? name
- ???????????????(letter) ???? underscore
????????????????????? ?????? ???? underscores. (
it would be expressed thus a-zA-Z0-9_\x7f-\xff
' ) - ?????????????????????????????????????
(case-sensitive) - ???????????????????????????? ???? thai_month
- PHP ??????????? Strong Type ????????????????
mixedmode ???????????????????????????????????? - Predefined variables (????????????????????????)
81PHP supports eight primitive types.
- Four scalar types
- boolean
- integer
- float (floating-point number, aka 'double')
- string
- Two compound types
- array
- object
- Two special types
- resource
- NULL
- Four pseudo-types types
- mixed
- number
- callback
82????????????? (Type Of Variable)
- Integer Number ???? rows200
- Floating Point Number ???? pi3.1416
- Boolean ???? flagtrue
- String ???? nameSongpon Maisalee
- Array ???? arr array(1,2)
- Object ???? obj new
83Boolean
- TRUE or FALSE. Both are case-insensitive.
- ?????????????????????????????????????????????? 0
???? false - ???????????(????)???????????????????
84Integer Floating Point
- ??????? integer ??????? CPU ??????????????????????
?? 2 billion (that's 32 bits signed) - ??????? floating point ??????? CPU
???????????????????????? 1.8e308 with a
precision of roughly 14 decimal digits is a
common value (that's 64 bit IEEE format).
85Integer
- decimal 1-90-9 0
- hexadecimal 0xX0-9a-fA-F
- octal 00-7
- integer -?decimal
- -?hexadecimal
- -?octal
- a 0123 // octal number (equivalent to 83
decimal) - a 0x1A // hexadecimal number (equivalent to
26 decimal)
86Floating point
- LNUM 0-9
- DNUM (0-9\.LNUM) (LNUM\.0-9)
- EXPONENT_DNUM
- ( (LNUM DNUM) eE-? LNUM)
87String
- ???????????????????? single quoted, double
quoted, heredoc - ???????? Array ???????????
- ?????? 64 ????????
- String Function
- strlen, strpos, strstr,strchar
- substr, strcmp, str_replace
- trim, rtrim
- String Conversion ????????????????
88Object
- ???????? class
- class class_name Method/Function
- _constructor() , _destruct()
- Create Object
- var new class_name
- Access Variable and Method in Object
- var-gtVarname Or Method
- inheritance By extends
- class Named_Cart extends Cart
- Scope Resolution Operator ()
- parentCONST_VAL,selfmyitem
89Computer Object Domain
90Array
- ???? Dynamic Array (??????????????????)
- ??????????? Function ???? ?????????????? ????
var array("foo" gt "bar", 12 gt
true) - Index ???????? 0 ??????????????????????? Index
????? - ?????????????????????????????????????????????(????
????) - ???????????? Dimension Array ???
- Function ????????? Array (????? Help)
- array, sizeof, unset
91Array (Cont)
- array( key gt value , ... )
- // key may be an integer or string
- // value may be any value
- arrkey value arr value
- // key may be an integer or string
- // value may be any value
92Constants
- ??????????????????????????????????????????????????
???????????? - ?????? define()
- define ("MAXSIZE", 100)
- echo MAXSIZE
- if (defined("CONSTANT"))
- echo CONSTANT
-
93Type Casting
- (int), (integer) - cast to integer
- (real), (double), (float) - cast to double
- (string) - cast to string
- (array) - cast to array
- (object) - cast to object
94Variable Scope ???????????????
- Local Scope
- By Default
- Global Scope
- global a,b ???? GLOBALSx
- Static
- static int 0
95Expr Expression
- expression is "anything that has a value".
- Any numeric non-zero numeric value is TRUE, zero
is FALSE, negative values are non-zero and are
thus considered TRUE. - The empty string and the string "0" are FALSE
all other strings are TRUE. - With non-scalar values (arrays and objects) - if
the value contains no elements it's considered
FALSE, otherwise it's considered TRUE.
96Operator ????????
- Arithmetic Operators , - , , / ,
- Assignment Operator (var othervar
Reference) - Incrementing/Decrementing Operators a, a,
--a, a-- - Comparison Operators ,!,lt,gtlt,gt
- Logical Operators , , !, and, or, xor
- String Operators . , .
- Bitwise Operators , , ltlt, gtgt,
- Error Control Operators _at_
- Execution Operators ls -l
- Operator Precedence ??????????
97highest-precedence operators listed at the top of
the table
98Control Structure Statement
- if ,else, elseif
- for,foreach
- while, do .. while
- switch
- break(for,while,switch) , continute
- require,require_once,include,include_one
- die(), exit()
99IF Statement
- If (expr) statements
- If (expr)
- statements
- else
- statements
-
- If (expr)
- statements
- elseif
- statements
- else
- statements
-
100For Statement
- for (initialization condition increment)
- statements
- ???? for (expr1 expr2 expr3) statement
- for (expr1 expr2 expr3)
- statements
- endfor
- foreach (array as value)
- statements
-
101While Do Statement
- while (expr)
- statements
-
- while (expr)
- statements
- endwhile
-
- do
- statements
- while (expr)
102Switch Statement
- One Check, Support -gtString, Integer
- switch (i)
- case 1
- statements
- break
- case 2
- statements
- break
- default
- statements
-
- switch (i)
- case 0
- statements
- break
- default
- statements
- print "i is not equal to 0, 1 or 2"
- endswitch
103?????????????????? Include Require
- include() , Include_once() ,require() ,
require_once() - take a local file or URL as input
- include() and include_once() provide a warning if
the resource cannot be retrieved and try to
continue execution of the program if possible - require() and require_once functions provide stop
processing the page if they cannot retrieve the
resource - It is best to use require_once() to include files
which contain necessary code and include_once()
to include files that contain content which the
program can run without e.g. HTML, CSS, etc.
104Custom Function
- function fun_name(para1,para2,)
-
- return xx
-
- Arguments
- Pass By Reference -gt xx
- Pass By Value -gt xx
- include, require,require_once
105Built In Function
- Mathematical Function
- Data File Function
- String Function
- etc. ?????????????? Function Reference
106Builtin Function
- echo , var_dump, sizeof, array, unset
107Date and Time functions
- checkdate Validate a gregorian date/time
- date Format a local time/date
- getdate Get date/time information
- gettimeofday Get current time
- gmdate Format a GMT/CUT date/time
- gmmktime Get UNIX timestamp for a GMT date
- gmstrftime Format a GMT/CUT time/date according
to locale settings - localtime Get the local time
- microtime Return current UNIX timestamp with
microseconds - mktime Get UNIX timestamp for a date
- strftime Format a local time/date according to
locale settings - time Return current UNIX timestamp
- strtotime Parse about any english textual
datetime description into a UNIX timestamp
108Error Handling
- PHP.INI -gt
- error_reporting E_ALL
- display_errors On
- log_errors On , error_log /path/to/filename
- set_error_handler()
- trigger_error()
- E_USER_NOTICE
- E_USER_WARNING
- E_USER_ERROR
109 110 111Form Elements
- FORM - Interactive form
- BUTTON - Button
- FIELDSET - Form control group
- LEGEND - Fieldset caption
- INPUT - Form input
- LABEL - Form field label
- SELECT - Option selector
- OPTGROUP - Option group
- OPTION - Menu option
- TEXTAREA - Multi-line text input
112FORM
- Syntax
- ltFORMgt...lt/FORMgt
- Attribute
- METHOD get post (HTTP method for submitting
form) - ENCTYPEContentType (content type to submit form
as) - ACCEPT-CHARSETCharsets (supported character
encodings) - TARGETFrameTarget (frame to render form result
in) - ONSUBMITScript (form was submitted)
- ONRESETScript (form was reset)
113Get VS Post Method
- ??? GET, ????????????????????????????? page
address ??? POST ??????????????? - ??? GET ???????????? form
- ??? GET ??????????????????????????? 256 ????????
- yourpage.php?userdavidreferrergowansnetarea6
- variablename_POST'variable'
- variablename_GET'variable'
114Get Example
- http//yourpage.php?userdavidreferrergowansnet
area6 - ???????????????
- variablename_GET'variable'
- ??? ?????????????????
115Post Example
- ltform namefrm1 actionurl method post gt
- ltinput typetext name user valuedavidgt
- ltinput typetext name referrer valuegowansnetgt
- ltinput typetext name area value6gt
- lt/formgt
- ???????????????
- variablename_POST'variable'
- ?????????? SUBMIT
116Import_request_variables
- bool import_request_variables ( string types ,
string prefix ) - Types 'G', 'P' and 'C' characters respectively
for GET, POST and Cookie. - ???? import_request_variables("gP",
"rvar_")
117Input Validate
- Client Validate at Client
- Server Validate at Server
- Use Regular expression /\d5/
- ,,,?,,.,,,(),
118What is cookie ?
- ?????????????? Text File ?????????????????
- setcookie("totals",23)
- HTTP_COOKIE_VARS"totals"
119What is session ?
- A visitor accessing your web site is assigned an
unique id, the so-called session id. - PHP will check automatically (if
session.auto_start is set to 1) or on your
request (explicitly through session_start() or
implicitly through session_register()) whether a
specific session id has been sent with the
request. - ?????????????? Memory ?? Sever
120Session Handling
- session_start Initialize session data
- session_destroy Destroys all data registered to
a session - session_name Get and/or set the current session
name - session_module_name Get and/or set the current
session module - session_save_path Get and/or set the current
session save path - session_id Get and/or set the current session
id - session_register Register one or more variables
with the current session - session_unregister Unregister a variable from
the current session - session_unset Free all session variables
- session_is_registered Find out if a variable is
registered in a session - session_get_cookie_params Get the session
cookie parameters - session_set_cookie_params Set the session
cookie parameters - session_decode Decodes session data from a
string - session_encode Encodes the current session data
as a string - session_set_save_handler Sets user-level
session storage functions - session_cache_limiter Get and/or set the
current cache limiter
121 122RDBMS
123Database Step
- Create a database
- Create User
- Grant Permission
- Create a table
- Create Index
- Create table constrain
- Load data into the table
- Retrieve data from the table in various ways
- Backup
124phpMyAdmin
125???????? Password ???????
- ??????????????????????????????? root ???????
passw0rd ???????? ??????????????
126??? Password ??? config.inc.php
- ???? config.inc.php ?????????? c\AppServ\www\phpM
yAdmin - ???????????? Editor ??
- cfg'Servers'i'password' '' //
MySQL password - ???????
- cfg'Servers'i'password' passw0rd'
127??????????????????????????????????
- ????? Login ???? phpMyAdmin
- MySQL connection collation ???? tis620_thai_ci
- ??????????????????
- ???????????????? train_db
- ??????????????????????
- tis620_thai_ci
- ???????????
CREATE DATABASE train_db DEFAULT CHARACTER SET
tis620 COLLATE tis620_thai_ci
128?????????????
- ?????????????????? train_db
- ???????????????? php_student ?????????????????? 4
???????????
CREATE TABLE train_db ( id CHAR( 2 ) NOT NULL
,thai_name VARCHAR( 100 ) NOT NULL
,position VARCHAR( 80 ) NOT NULL
,department VARCHAR( 80 ) NOT NULL ) TYPE
MYISAM
129??????????????????????????
130Select Statement
- SELECT STRAIGHT_JOIN SQL_SMALL_RESULT
SQL_BIG_RESULT - SQL_BUFFER_RESULT SQL_CACHE SQL_NO_CACHE
SQL_CALC_FOUND_ROWS HIGH_PRIORITY DISTINCT
DISTINCTROW ALL select_expression,... - INTO OUTFILE DUMPFILE 'file_name'
export_options - FROM table_references
- WHERE where_definition
- GROUP BY unsigned_integer col_name
formula ASC DESC, ... - HAVING where_definition
- ORDER BY unsigned_integer col_name
formula ASC DESC ,... - LIMIT offset, rows
- PROCEDURE procedure_name
- FOR UPDATE LOCK IN SHARE MODE
- Example
- SELECT what_to_select FROM which_table WHERE
conditions_to_satisfy - SELECT FROM pet WHERE name "Bowser"
131Update Statement
- UPDATE LOW_PRIORITY IGNORE tbl_name SET
col_name1expr1 , col_name2expr2, ... WHERE
where_definition LIMIT - Example
- UPDATE persondata SET ageage2
132Insert Statement
- INSERT LOW_PRIORITY DELAYED IGNORE INTO
tbl_name (col_name,...) VALUES ((expression
DEFAULT),...),(...),... - Example
- INSERT INTO tbl_name (col1,col2)
VALUES(col22,15)
133Delete Statement
- DELETE LOW_PRIORITY QUICK FROM table_name
- WHERE where_definition ORDER BY ...
LIMIT rows - Example
- DELETE FROM table_name WHERE 1gt0
134??????????????
- ????? Global level
- ??????????????????????????????????????????????
???????? ??? ?????????? ????????????????????
mysql.user ???? grant all on . to
userxx_at_localhost identified by userxx - ????? Database Level
- ??????????????????????????????? ???????? ???
?????????? ???????????????????????????????????
mysql.db ??? mysql.host ???? grant all on
dbname. to userxx_at_localhost identified by
userxx - ????? Table Level
- ?????????????????????????????????????????????????
??? ?????????? ????????????????????mysql.tables_pr
iv ???? grant all on .tabname to
userxx_at_localhost identified by userxx - ????? Column Level
- ??????????????????????????????????????????????????
???? ????????????????????mysql.tables_priv - ????????????
- global privileges OR (database privileges AND
host privileges) OR table privileges OR column
privileges
135Database Functions
- int mysql_connect(host,usrer,pass)
- int mysql_pconnect (host,usrer,pass)
- Int myql_create_db(database_name,database_connec
t) - int mysql_select_db(databasename)
- int mysql_query(query,database_connect)
- mysql_close(database_connect)
- Int mysql_drop(database_name,database_connect)
136Database Functions (continue)
- int mysql_fetch_array(result,result_type)
- int mysql_fetch_row(result)
- int mysql_num_rows(result)
- mixed mysql_result(result,row,field)
- object mysql_fetch_object(result)
137Database Functions
- int mysql_connect(host,usrer,pass)
- int mysql_query(query,database_connect)
- int mysql_db_query(query,database_connect)
- mysql_close(database_connect)
- int mysql_fetch_array(result,result_type)
- int mysql_fetch_row(result)
- int mysql_num_rows(result)
- mixed mysql_result(result,row,field)
- object mysql_fetch_object(result)