SlideShare una empresa de Scribd logo
1 de 12
Descargar para leer sin conexión
PHP+MYSQL
projetcsoft.biz F F ก
ก ก F MySQL F PHP
1. ก ก username password
กF ก F MySQL
$dbUname="Enter your MySQL username.";
$dbPword="Enter your MySQL Password.";
$dbHost="Enter your MySQL sever name.";
$dbName="Enter your MySQL sever name.";
$link=mysql_connect($dbHost,$dbUname,$dbPword);
mysql_select_db($dbName,$link);
mysql_query('SET CHARACTER SET utf-8');
mysql_query('SET collation_connection
utf8_unicode_ci');
projetcsoft.biz F F ก
2. F SQL F MySQL
$sql = " sql ";
$result=mysql_query($sql);
mysql_close($link);
F ก ก F $result
projetcsoft.biz F F ก
3. F F F ก MySQL
ก F 2. ก SQL ˈ F F
( Select ) F F mysql_featch_array()
F ก $result
$resultArray=mysql_featch_array($result);
projetcsoft.biz F F ก
F F
$sql = "SELECT name,price FROM product";
$result=mysql_query($sql);
mysql_close($link);
$resultArray=mysql_featch_array($result);$resultArray=mysql_featch_array($result);
echo $resultArray[0]; name
echo $resultArray[1]; price
echo $resultArray["name"]; name
echo $resultArray["price"]; price
ก F F ก projetcsoft.biz F F ก
ก F F
ก F F ก F product ก
ก F ก F ก F F loop while F
F
$resultArray=mysql_featch_array($result);$resultArray=mysql_featch_array($result);
while($resultArray=mysql_featch_array($result))
{
echo $resultArray["name"];
echo $resultArray["price"];
} F ก F F ก product F
projetcsoft.biz F F ก
ก F
MySQL F ˈ Function
ก ก ก
F F Function
function runSqlQuery($sql){
$dbUname="Enter your MySQL username.";$dbUname="Enter your MySQL username.";
$dbPword="Enter your MySQL Password.";
$dbHost="Enter your MySQL sever name.";
$dbName="Enter your MySQL sever name.";
$link=mysql_connect($dbHost,$dbUname,$dbPword);
projetcsoft.biz F F ก
mysql_select_db($dbName,$link);
mysql_query('SET CHARACTER SET utf-8');
mysql_query('SET collation_connection
utf8_unicode_ci');
ก F
MySQL F ˈ Function
$result=mysql_query($sql);
mysql_close($link);
return $result;
}
projetcsoft.biz F F ก
ก function F กF code F F F ก
F
$sql = "SELECT name,price FROM product";
$result=runSqlQuery($sql);
ก F
MySQL F ˈ Function
$result=runSqlQuery($sql);
while($resultArray=mysql_featch_array($result))
{
echo $resultArray["name"];
echo $resultArray["price"];
}
projetcsoft.biz F F ก
ก F F ก MySQL Tag Table
<table>
<tr>
<td> F </td>
<td> </td>
</tr></tr>
<?PHP $sql = "SELECT name,price FROM
product";
$result=runSqlQuery($sql);
while($resultArray=mysql_featch_array($result))
{ ?>
projetcsoft.biz F F ก
<tr>
<td>
<?PHP echo $resultArray["name"]; ?>
</td>
<td>
ก F F ก MySQL Tag Table
<td>
<?PHP echo $resultArray["price"]; ?>
</td>
</tr>
<?PHP } ?>
projetcsoft.biz F F ก
<select name="select_product" >
<?PHP $sql = "SELECT id,name FROM product";
$result=runSqlQuery($sql);
while($resultArray=mysql_featch_array($result))
{ ?>
ก F F ก MySQL Tag Select
{ ?>
<option
value="<?PHP echo $resultArray["id"]; ?>" >
<?PHP echo $resultArray["name"]; ?>
</option>
<?PHP } ?> F F F F ˈ
projetcsoft.biz F F ก

Más contenido relacionado

La actualidad más candente

I, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 OverlordsI, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 Overlordsheumann
 
PerlでWeb API入門
PerlでWeb API入門PerlでWeb API入門
PerlでWeb API入門Yusuke Wada
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked aboutTatsuhiko Miyagawa
 
DEV Čtvrtkon #76 - Fluent Interface
DEV Čtvrtkon #76 - Fluent InterfaceDEV Čtvrtkon #76 - Fluent Interface
DEV Čtvrtkon #76 - Fluent InterfaceCtvrtkoncz
 
16.mysql stored procedures in laravel
16.mysql stored procedures in laravel16.mysql stored procedures in laravel
16.mysql stored procedures in laravelRazvan Raducanu, PhD
 
6 things about perl 6
6 things about perl 66 things about perl 6
6 things about perl 6brian d foy
 
Advanced modulinos trial
Advanced modulinos trialAdvanced modulinos trial
Advanced modulinos trialbrian d foy
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applicationselliando dias
 
So cal0365productivitygroup feb2019
So cal0365productivitygroup feb2019So cal0365productivitygroup feb2019
So cal0365productivitygroup feb2019RonRohlfs1
 
Refactoring using Codeception
Refactoring using CodeceptionRefactoring using Codeception
Refactoring using CodeceptionJeroen van Dijk
 
Advanced modulinos
Advanced modulinosAdvanced modulinos
Advanced modulinosbrian d foy
 
Creating a compiler in Perl 6
Creating a compiler in Perl 6Creating a compiler in Perl 6
Creating a compiler in Perl 6Andrew Shitov
 
Total World Domination with i18n (es)
Total World Domination with i18n (es)Total World Domination with i18n (es)
Total World Domination with i18n (es)Zé Fontainhas
 
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)Michael Wales
 
Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)brian d foy
 
The Perl6 Type System
The Perl6 Type SystemThe Perl6 Type System
The Perl6 Type Systemabrummett
 

La actualidad más candente (20)

Perl 6 by example
Perl 6 by examplePerl 6 by example
Perl 6 by example
 
I, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 OverlordsI, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 Overlords
 
Perl6 grammars
Perl6 grammarsPerl6 grammars
Perl6 grammars
 
PerlでWeb API入門
PerlでWeb API入門PerlでWeb API入門
PerlでWeb API入門
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked about
 
DEV Čtvrtkon #76 - Fluent Interface
DEV Čtvrtkon #76 - Fluent InterfaceDEV Čtvrtkon #76 - Fluent Interface
DEV Čtvrtkon #76 - Fluent Interface
 
16.mysql stored procedures in laravel
16.mysql stored procedures in laravel16.mysql stored procedures in laravel
16.mysql stored procedures in laravel
 
6 things about perl 6
6 things about perl 66 things about perl 6
6 things about perl 6
 
Advanced modulinos trial
Advanced modulinos trialAdvanced modulinos trial
Advanced modulinos trial
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
 
So cal0365productivitygroup feb2019
So cal0365productivitygroup feb2019So cal0365productivitygroup feb2019
So cal0365productivitygroup feb2019
 
Refactoring using Codeception
Refactoring using CodeceptionRefactoring using Codeception
Refactoring using Codeception
 
21.search in laravel
21.search in laravel21.search in laravel
21.search in laravel
 
Advanced modulinos
Advanced modulinosAdvanced modulinos
Advanced modulinos
 
Creating a compiler in Perl 6
Creating a compiler in Perl 6Creating a compiler in Perl 6
Creating a compiler in Perl 6
 
Total World Domination with i18n (es)
Total World Domination with i18n (es)Total World Domination with i18n (es)
Total World Domination with i18n (es)
 
Perl6 in-production
Perl6 in-productionPerl6 in-production
Perl6 in-production
 
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
 
Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)
 
The Perl6 Type System
The Perl6 Type SystemThe Perl6 Type System
The Perl6 Type System
 

Similar a Session8

Similar a Session8 (20)

Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
 
与 PHP 和 Perl 使用 MySQL 数据库
与 PHP 和 Perl 使用 MySQL 数据库与 PHP 和 Perl 使用 MySQL 数据库
与 PHP 和 Perl 使用 MySQL 数据库
 
Php Mysql
Php Mysql Php Mysql
Php Mysql
 
06 Php Mysql Connect Query
06 Php Mysql Connect Query06 Php Mysql Connect Query
06 Php Mysql Connect Query
 
The History of PHPersistence
The History of PHPersistenceThe History of PHPersistence
The History of PHPersistence
 
Stored Procedure
Stored ProcedureStored Procedure
Stored Procedure
 
veracruz
veracruzveracruz
veracruz
 
veracruz
veracruzveracruz
veracruz
 
veracruz
veracruzveracruz
veracruz
 
veracruz
veracruzveracruz
veracruz
 
Lecture6 display data by okello erick
Lecture6 display data by okello erickLecture6 display data by okello erick
Lecture6 display data by okello erick
 
Presentation1
Presentation1Presentation1
Presentation1
 
Drupal Development (Part 2)
Drupal Development (Part 2)Drupal Development (Part 2)
Drupal Development (Part 2)
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
 
PHP and Mysql
PHP and MysqlPHP and Mysql
PHP and Mysql
 
Php
PhpPhp
Php
 
Pemrograman Web 8 - MySQL
Pemrograman Web 8 - MySQLPemrograman Web 8 - MySQL
Pemrograman Web 8 - MySQL
 
PHP Data Objects
PHP Data ObjectsPHP Data Objects
PHP Data Objects
 
Php mysq
Php mysqPhp mysq
Php mysq
 
PHP with MySQL
PHP with MySQLPHP with MySQL
PHP with MySQL
 

Último

Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 

Último (20)

Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 

Session8

  • 1. PHP+MYSQL projetcsoft.biz F F ก ก ก F MySQL F PHP
  • 2. 1. ก ก username password กF ก F MySQL $dbUname="Enter your MySQL username."; $dbPword="Enter your MySQL Password."; $dbHost="Enter your MySQL sever name."; $dbName="Enter your MySQL sever name."; $link=mysql_connect($dbHost,$dbUname,$dbPword); mysql_select_db($dbName,$link); mysql_query('SET CHARACTER SET utf-8'); mysql_query('SET collation_connection utf8_unicode_ci'); projetcsoft.biz F F ก
  • 3. 2. F SQL F MySQL $sql = " sql "; $result=mysql_query($sql); mysql_close($link); F ก ก F $result projetcsoft.biz F F ก
  • 4. 3. F F F ก MySQL ก F 2. ก SQL ˈ F F ( Select ) F F mysql_featch_array() F ก $result $resultArray=mysql_featch_array($result); projetcsoft.biz F F ก
  • 5. F F $sql = "SELECT name,price FROM product"; $result=mysql_query($sql); mysql_close($link); $resultArray=mysql_featch_array($result);$resultArray=mysql_featch_array($result); echo $resultArray[0]; name echo $resultArray[1]; price echo $resultArray["name"]; name echo $resultArray["price"]; price ก F F ก projetcsoft.biz F F ก
  • 6. ก F F ก F F ก F product ก ก F ก F ก F F loop while F F $resultArray=mysql_featch_array($result);$resultArray=mysql_featch_array($result); while($resultArray=mysql_featch_array($result)) { echo $resultArray["name"]; echo $resultArray["price"]; } F ก F F ก product F projetcsoft.biz F F ก
  • 7. ก F MySQL F ˈ Function ก ก ก F F Function function runSqlQuery($sql){ $dbUname="Enter your MySQL username.";$dbUname="Enter your MySQL username."; $dbPword="Enter your MySQL Password."; $dbHost="Enter your MySQL sever name."; $dbName="Enter your MySQL sever name."; $link=mysql_connect($dbHost,$dbUname,$dbPword); projetcsoft.biz F F ก
  • 8. mysql_select_db($dbName,$link); mysql_query('SET CHARACTER SET utf-8'); mysql_query('SET collation_connection utf8_unicode_ci'); ก F MySQL F ˈ Function $result=mysql_query($sql); mysql_close($link); return $result; } projetcsoft.biz F F ก
  • 9. ก function F กF code F F F ก F $sql = "SELECT name,price FROM product"; $result=runSqlQuery($sql); ก F MySQL F ˈ Function $result=runSqlQuery($sql); while($resultArray=mysql_featch_array($result)) { echo $resultArray["name"]; echo $resultArray["price"]; } projetcsoft.biz F F ก
  • 10. ก F F ก MySQL Tag Table <table> <tr> <td> F </td> <td> </td> </tr></tr> <?PHP $sql = "SELECT name,price FROM product"; $result=runSqlQuery($sql); while($resultArray=mysql_featch_array($result)) { ?> projetcsoft.biz F F ก
  • 11. <tr> <td> <?PHP echo $resultArray["name"]; ?> </td> <td> ก F F ก MySQL Tag Table <td> <?PHP echo $resultArray["price"]; ?> </td> </tr> <?PHP } ?> projetcsoft.biz F F ก
  • 12. <select name="select_product" > <?PHP $sql = "SELECT id,name FROM product"; $result=runSqlQuery($sql); while($resultArray=mysql_featch_array($result)) { ?> ก F F ก MySQL Tag Select { ?> <option value="<?PHP echo $resultArray["id"]; ?>" > <?PHP echo $resultArray["name"]; ?> </option> <?PHP } ?> F F F F ˈ projetcsoft.biz F F ก