How to fetch Data from Database in PHP And Display HTML Tables

Published: 21 April 2020
on channel: KITH Sophal
105
0

How to fetch Data from Database in PHP And Display HTML Tables

Support My Channel
Do LIKE | COMMENT | SHARE | SUBSCRIBE
See more videos by S O P H A L here :​
   / @kithsophal  


របៀបទាញទិន្នន័យពី Table
ដើម្បីទាញយកទិន្នន័យពី Table របស់ Database មកប្រើប្រាស់វិញនោះ។ យើងត្រូវប្រើ SELECT Statement របស់ភាសា SQL ដើម្បីទាញយក Record ទាំងអស់ពី Table


ការប្រើប្រាស់ File Connection
» រូបមន្តទី១ ៖ $con = mysql_connect(…)
» រូបមន្តទី២ ៖ $link = mysqli_connect(…)
» រូបមន្តទី៣ ៖ $mysqli= new mysqli(…)
» រូបមន្តទី៤ ៖ $pdo= new PDO(…)


$result=mysql_query("select * from tbl1") or die(mysql_error());
while ($row = mysql_fetch_array($result))
{
echo " ID : ".$row['id'];
echo " Name : ".$row['name'];
echo “Sex : “.$row['sex'];
echo "_________________";
}
mysql_close();


Facebook: https://fb.com/sophal.official/

Website: http://isophal.com/


Watch video How to fetch Data from Database in PHP And Display HTML Tables online without registration, duration hours minute second in high quality. This video was added by user KITH Sophal 21 April 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 10 once and liked it people.