Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-11-2005, 10:48 AM
New kid on the block
 
Join Date: Jul 2005
Location: gumbak
Posts: 4
Rep Power: 0
ridz_021 is on a distinguished road
chart... tolong sket...

iii...
saya nak tanya skit...
1. Bagaimana saya nak wat jadual or carta ker dengan menggunakan aplikasi php + mysql or di combine kan dengan php + mysql? Means camnie... saya nak wat organization chart dlm website dan chart nie boleh sentiasa berubah ( link dgn database ) ... Means kalo ader pertambahan pekerja ker..so chart tu berubah...

2. Pastu yg chart nie boleh dibesarkan skit skop dier..kepada carta pie ker..kepada graf palang ker.... n dipendekkan citer; any chart or graf yg berkait

3. Boleh tak php di combinekan dengan excel ker... or any tools yang boleh wat chart ? kalo ader hope boleh bagi hints and rujukan skit.. bcoz mmg blur n tak tau nk start wat cmner...thx bbyk...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 08-11-2005, 02:37 PM
heterozigot's Avatar
Novice Webmaster
 
Join Date: Jan 2003
Location: PJ
Posts: 51
Rep Power: 73
heterozigot is on a distinguished road
Send a message via ICQ to heterozigot Send a message via Yahoo to heterozigot
soalan 1.
Pasal nak buat org chart tu, memang boleh di dynamickan menggunakan PHP, tapi kalo nak free-code, tak sure...sebab tu kena customize. Kena pikir btol2, kena wat study dulu, sebab nak flexible kan chart tu..algo kena cipta sendiri....

soalan 2.
Itu di syorkan pakai JPGRAPH, try search google utk rujukan lanjut.

soalan 3.
PHP bole mengexport database dalam format CSV, save as....leh bukak pakai excel. kalo nak export tros pun bleh. cth code

PHP Code:
$linkID mysql_connect("localhost""root""");
$db mysql_select_db("ureg");
$result mysql_query('select * from bill'$linkID);
$count mysql_num_fields($result);

for (
$i 0$i $count$i++){
    
$header .= mysql_field_name($result$i)."\t";
}

while(
$row mysql_fetch_row($result)){
  
$line '';
  foreach(
$row as $value){
    if(!isset(
$value) || $value == ""){
      
$value "\t";
    }else{
# important to escape any quotes to preserve them in the data.
      
$value str_replace('"''""'$value);
# needed to encapsulate data in quotes because some data might be multi line.
# the good news is that numbers remain numbers in Excel even though quoted.
      
$value '"' $value '"' "\t";
    }
    
$line .= $value;
  }
  
$data .= trim($line)."\n";
}
# this line is needed because returns embedded in the data have "\r"
# and this looks like a "box character" in Excel
  
$data str_replace("\r"""$data);


# Nice to let someone know that the search came up empty.
# Otherwise only the column name headers will be output to Excel.
if ($data == "") {
  
$data "\nno matching records found\n";
}

# This line will stream the file to the user rather than spray it across the screen
header("Content-type: application/octet-stream");

# replace excelfile.xls with whatever you want the filename to default to
header("Content-Disposition: attachment; filename=excelfile.xls");
header("Pragma: no-cache");
header("Expires: 0");

echo 
$header."\n".$data
__________________
Try and Support Malaysia Product.
http://foto.home.net.my
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-11-2005, 12:21 AM
zaimlah's Avatar
Inspired Webmaster
 
Join Date: Jul 2001
Location: ttdi
Posts: 129
Rep Power: 92
zaimlah is on a distinguished road
Ataupun, boleh guna PEAR package "Image_Graph": http://pear.php.net/package/Image_Graph

Tapi, mesti guna PHP ke? Saya rasa MS Excel ataupun OpenOffice.org ada feature untuk 'connect' documents kepada database untuk dapatkan data (e.g. melalui ODBC, JDBC(openoffice), etc.). Not sure sangat exactly pasal ni...
__________________
blog:zaim_bakar_blog | biz:box
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-11-2005, 05:26 PM
New kid on the block
 
Join Date: Jul 2005
Location: gumbak
Posts: 4
Rep Power: 0
ridz_021 is on a distinguished road
Thanks...
Yg pasal graf nie..sy da try wat dr link2 yg dibagi n also dr link nie.. http://www.maani.us/charts/index.php...enu=Chart_Data
but yang sebenarnya sy try carik adalah cara nak wat organization chart.. so far sy surf xder perasan laks ader cara nk wat dier...so kalo saper yg ader perasan or tau ker inform k...

ermm..ader yerk excel n open ofice yg link ngn database? not sure... bole ker means kalo tiap2 ari update ker... so direct trus bole change kat page tanpa edit2 chart...means..xyah la tiap2 kali nk edit jerk kene masuk excel or visio then upload kan... kalo bole sy nk yg ni trus masukkan data psl pekerja tuh n trus chart terbentuk (dahan pokok organization tuh terbentuk).. so ader idea??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 08-02-2006, 01:19 PM
annuR's Avatar
Novice Webmaster
 
Join Date: Sep 2005
Location: Perak
Posts: 13
Rep Power: 0
annuR is on a distinguished road
Send a message via Yahoo to annuR
saya ada jugak buat graf..
tapi saya menggunakan jpgraph..
sbb benda tue lebih mudah dpt terus link dgn database..
so kalo tak paham lg nti bleh ty..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
tlg check sket code ni prozone Website Programming 3 04-08-2005 10:17 PM
Nak tanya sket jepp Website Programming 2 18-03-2005 01:05 PM
tolong sket pasal style... YajivMalhotra Website Design 2 02-11-2004 12:40 PM
kasi guideline sket.... spicy_girl Website Programming 78 16-02-2004 03:55 PM
Top 50 - Malaysian Website Rank Chart! mysticmind News and Announcements 14 11-04-2003 06:18 PM



All times are GMT +8. The time now is 02:26 AM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60