O’zbekiston respublikasi axborot texnologiyalari va kommunikasiyalarini rivojlantirish vazirligi


Download 0.6 Mb.
bet15/24
Sana02.01.2022
Hajmi0.6 Mb.
#185872
1   ...   11   12   13   14   15   16   17   18   ...   24
Bog'liq
Loyiha ishi Normorodov Muhammadjon Xushboq O'g'li 8.01.2021

2.4. Dasturiy taminotning strukturasi



Online Ambulance
Client-server prinspi



Foydalanuvchi tibbiyot haqidadagi bo’limlar orqali o’ziga kerakli
ma’lumotlarni ko’rishi, ular haqida ma’lumotlar olishi mumkin va saqlashi
mumkin.


SERVER



JSON


PHP kodi

SERVER
JSON
@mysql_connect("db.webspace.uz","khorezms_admin","khorezm1417")or
die("Severga bog`lanishda muammo ");
@mysql_select_db("khorezms_help")or die("Bazaga bog`lanishda xatolik");
$query="SELECT
`info`.info_id,`info_type`.info_type_name,`info`.info_image,`info`.info_add_ti
me,`info`.info_sarlavha,`info`.info_matn FROM `info_type`,`info` WHERE
`info`.info_type_id=`info_type`.info_type_id";
if(isset($_GET["type"]) && intval($_GET["type"])>0) {
$query .= " AND `info`.info_type_id=".$_GET["type"];
}
$result = mysql_query($query) or die('So`rovda xatolik: '.$query);
$response["info"] = array();
if(mysql_num_rows($result)) {
while($row = mysql_fetch_assoc($result)) {
$info = array();
$info["info_id"] = $row["info_id"];
$info["info_type_name"] = $row["info_type_name"];
$info["info_add_time"] = $row["info_add_time"];
$info["info_image"] = $row["info_image"];
$info["info_sarlavha"] = $row["info_sarlavha"];
$info["info_matn"] = $row["info_matn"];
array_push($response["info"], $info);
}
}
header('Content-type: application/json');
echo json_encode($response);
@mysql_close();
?>


Download 0.6 Mb.

Do'stlaringiz bilan baham:
1   ...   11   12   13   14   15   16   17   18   ...   24




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling