Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > ช่วยดูให้หน่อยค่ะทำเกี่ยวกับเรื่อง ระบบจัดเก็บสถิติอุบัติเหตุผ่าน google map



 

ช่วยดูให้หน่อยค่ะทำเกี่ยวกับเรื่อง ระบบจัดเก็บสถิติอุบัติเหตุผ่าน google map

 



Topic : 078413



โพสกระทู้ ( 21 )
บทความ ( 0 )



สถานะออฟไลน์




ประมาณว่าพอคลิกที่อำเภอนี้ แล้วก็เข้าคลิกปุ่มเพื่มเติม

แสดงผล google map

ก็จะเข้ามาดูสถิติของ ชาย และ หญิง ของเฉพาะอำเภอนี้เลย แต่หนูไม่รุว่าจะ ใส่ค่าออกมายังงัยให้ออกมาเเฉพาะของแต่ละอำเภอที่เราเลือกค่ะรบกวนพี่ช่วยหน่อยนะคะ

รูปจำแนกสถิติตามเพศ <-- ตัวอย่างที่อยากแสดงแบบรูปนี้คะ

อันนี้โค๊ดของกราฟที่แสดงผลของ สถิติ ชาย,หญิง คะ

Code (PHP)
<?php
//We've included ../Includes/FusionCharts.php and ../Includes/DBConn.php, which contains
//functions to help us easily embed the charts and connect to a database.
include("../Includes/FusionCharts.php");
include("../Includes/DBConn.php");
?>
<HTML>
<HEAD>
	<TITLE>
	สถิติจำแนกตามเพศ
	</TITLE>
	<?php
	//You need to include the following JS file, if you intend to embed the chart using JavaScript.
	//Embedding using JavaScripts avoids the "Click to Activate..." issue in Internet Explorer
	//When you make your own charts, make sure that the path to this JS file is correct. Else, you would get JavaScript errors.
	?>	
	<SCRIPT LANGUAGE="Javascript" SRC="../../FusionCharts/FusionCharts.js"></SCRIPT>
	<style type="text/css">
	<!--
	body {
		font-family: Arial, Helvetica, sans-serif;
		font-size: 12px;
	}
	.text{
		font-family: Arial, Helvetica, sans-serif;
		font-size: 12px;
	}
.style1 {font-size: 16px}
	-->
	</style>
</HEAD>
<BODY>
<form name="form1" method="post" action="">
  <table width="627" height="266" border="0" align="center">
    <tr>
      <td height="27" colspan="3" bgcolor="#FFCCFF"><div align="center">
        <p>สถิติอุบัติเหตุ จ. ลพบุรี</p>
        </div></td>
    </tr>
    <tr>
      <td width="104">&nbsp;</td>
      <td width="339" rowspan="3"><p align="center" class="style1">&nbsp;</p>
        <p align="center">
          <?php
    //In this example, we show how to connect FusionCharts to a database.
    //For the sake of ease, we've used an MySQL databases containing two
    //tables.

    // Connect to the DB
    $link = connectToDB();

    //We also keep a flag to specify whether we've to animate the chart or not.
    //If the user is viewing the detailed chart and comes back to this page, he shouldn't
    //see the animation again.
    $animateChart = $_GET['animate'];
    //Set default value of 1
    if ($animateChart=="")
        $animateChart = "1";

    //$strXML will be used to store the entire XML document generated
    //Generate the chart element
    $strXML = "<chart caption=' ' subCaption=' ' pieSliceDepth='30' showBorder='1' formatNumberScale='0' numberSuffix='  ' animation=' " . $animateChart . "'>";

    // Fetch all factory records
//    $strQuery = "select * from Factory_Master";	
 //   $result = mysql_query($strQuery) or die(mysql_error());
            $strQuery = "select t1.*,t2.women
FROM (SELECT dt_district, count(dt_district) as man FROM detail where dt_sex='ชาย' group by dt_district) as t1
left join 
(SELECT dt_district, count(dt_district) as women FROM detail  where dt_sex='หญิง' group by dt_district) as t2
on t1.dt_district=t2.dt_district";
      $result2 = mysql_query($strQuery) or die(mysql_error()); 
    //Iterate through each factory
  if ($result2) {
        while($ors2 = mysql_fetch_array($result2)) {
            $strXML .= "<set label='" . $ors2['dt_sex'] . "' value='" . $ors2['   '] . "' />"; // ตรงนี่ไม่รุจะใส่ค่ายังไงให้แสดงในแท่งกราฟคะ
        }
    }
    mysql_close($link);

    //Finally, close <chart> element
    $strXML .= "</chart>";

    //Create the chart - Pie 3D Chart with data from strXML
    echo renderChart("../../FusionCharts/Column3D.swf", "", $strXML, "FactorySum", 450, 250, false, false);
?>




Tag : PHP









ประวัติการแก้ไข
2012-05-15 08:22:01
2012-05-15 08:23:05
2012-05-15 10:20:17
Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2012-05-15 08:05:50 By : Duangrawee View : 1177 Reply : 4
 

 

No. 1



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

Code (PHP)
$strXML .= "<set label='" . $ors2['dt_sex'] . "' value='" . $ors2['man'] . "' />"; // ตรงนี่ไม่รุจะใส่ค่ายังไงให้แสดงในแท่งกราฟคะ


แบบนี้หรือเปล่าครับ






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-05-15 11:21:45 By : mr.win
 


 

No. 2



โพสกระทู้ ( 21 )
บทความ ( 0 )



สถานะออฟไลน์


ลองทำแล้วค่ะมันออกแต่ค่า ชายทั้งหมด แต่หนูต้องการให้ออกผลรวม เป็นแค่หญิงกับชาย ของเฉพาะอำเภออะค่ะ
เหมือนตัวอย่างรูปกราฟที่แสดงอะคะ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-05-15 12:17:10 By : Duangrawee
 

 

No. 3



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

มันมีให้โยนค่า parameters แบบ 2 ตัวได้หรือเปล่าครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-05-15 12:35:29 By : mr.win
 


 

No. 4



โพสกระทู้ ( 21 )
บทความ ( 0 )



สถานะออฟไลน์


ทำยังไงอะค่ะรบกวนพี่ช่วยดูให้หน่อยนะ ขอบคุณค่ะ


ประวัติการแก้ไข
2012-05-15 14:09:00
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-05-15 12:41:55 By : Duangrawee
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ช่วยดูให้หน่อยค่ะทำเกี่ยวกับเรื่อง ระบบจัดเก็บสถิติอุบัติเหตุผ่าน google map
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 03
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่