Tài liệu Lấy dữ liệu từ mysql lặp theo cấu trúc XML docx

7 632 1
Tài liệu Lấy dữ liệu từ mysql lặp theo cấu trúc XML docx

Đang tải... (xem toàn văn)

Thông tin tài liệu

Bài Viết Trên Đã nói qua. Bài viết này sẽ hướng dẫn cụ thể bạn lặp thế nào để ra cấu trúc xml hoàn chỉnh cho flash đọc dữ liệu Đầu Tiên Import đoạn dữ liệu mẫu Sau Vào PHP Code: -- -- Table structure for table `albumflash` -- CREATE TABLE IF NOT EXISTS `albumflash` ( `id` int(1) NOT NULL auto_increment, `urlhinh` varchar(555) NOT NULL, `casi` varchar(555) NOT NULL, `album` varchar(555) NOT NULL, `linkcasi` varchar(555) NOT NULL, `linkalbum` varchar(555) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ; -- -- Dumping data for table `albumflash` -- INSERT INTO `albumflash` (`id`, `urlhinh`, `casi`, `album`, `linkcas i`, `linkalbum`) VALUES (1, 'images/album1.jpg', 'Ca Si 1', 'Album 1', 'http://hoangth.webdo anhnghiep.org/', 'http://hoangth.webdoanhnghiep.org/'), (2, 'images/album2.jpg', 'Ca Si 2', 'Album 2', 'http://hoangth.webdo anhnghiep.org/', 'http://hoangth.webdoanhnghiep.org/'), (3, 'images/album3.jpg', 'Ca Si 3', 'Album 3', 'http://hoangth.webdo anhnghiep.org/', 'http://hoangth.webdoanhnghiep.org/'), (4, 'images/album4.jpg', 'Ca Si 4', 'Album 4', 'http://hoangth.webdo anhnghiep.org/', 'http://hoangth.webdoanhnghiep.org/'), (5, 'images/album5.jpg', 'Ca Si 5', 'Album 5', 'http://hoangth.webdo anhnghiep.org/', 'http://hoangth.webdoanhnghiep.org/'), (6, 'images/album6.jpg', 'Ca Si 6', 'Album 6', 'http://hoangth.webdo anhnghiep.org/', 'http://hoangth.webdoanhnghiep.org/'), (7, 'images/album7.jpg', 'Ca Si 7', 'Album 7', 'http://hoangth.webdo anhnghiep.org/', 'http://hoangth.webdoanhnghiep.org/'), (8, 'images/album8.jpg', 'Ca Si 8', 'Album 9', 'http://hoangth.webdo anhnghiep.org/', 'http://hoangth.webdoanhnghiep.org/'), (9, 'images/album9.jpg', 'Ca Si 9', 'Album 9', 'http://hoangth.webdo anhnghiep.org/', 'http://hoangth.webdoanhnghiep.org/'); Bước 1 : Mở DW lên. Tạo site và 1 file php trống. Bước 2 : Tạo Recordset cho table vừa rồi Click this bar to view the small image. Bước 3 : Copy Đoạn code bên dưới dán vào phần body của file vừa tạo ở trên PHP Code: <artworkinfo> <albuminfo> <artLocation>images/album1.jpg</artLocation> <artist>The Doors</artist> <albumName>Greatest Hits</albumName> <artistLink>http://hoangth.webdoanhnghiep.org</artistLink> <albumLink>http://hoangth.webdoanhnghiep.org</albumLink> </albuminfo> </artworkinfo> Click this bar to view the small image. Lưu ý : Làm ở chế độ code Bước 4: Tiến H ành kéo thả và lặp dữ liệu . Click this bar to view the small image. Tiến hành lặp Toàn Bộ PHP Code: <albuminfo> <artLocation><?php echo $row_Recordset1['urlhinh']; ?></artL ocation> <artist><?php echo $row_Recordset1['casi']; ?></artist> <albumName><?php echo $row_Recordset1['album']; ?></albumNam e> <artistLink><?php echo $row_Recordset1['linkcasi']; ?></arti stLink> <albumLink><?php echo $row_Recordset1['linkalbum']; ?></albu mLink> </albuminfo> Click this bar to view the small image. Click this bar to view the small image. Click this bar to view the full image. Kết Quả Sau Khi Lặp Click this bar to view the small image. Bước 5 : Xóa Đi tất cả phần mã HTML Click this bar to view the small image. Sau khi xóa xong copy toàn bộ nội dung dán sang file albuminfo.php và save albuminfo.php lại Bước Cuối : Qua index.html mở l ên và F12 Coi Kết Quả Click this bar to view the small image. . viết này sẽ hướng dẫn cụ thể bạn lặp thế nào để ra cấu trúc xml hoàn chỉnh cho flash đọc dữ liệu Đầu Tiên Import đoạn dữ liệu mẫu Sau Vào PHP Code: -- --. ở chế độ code Bước 4: Tiến H ành kéo thả và lặp dữ liệu . Click this bar to view the small image. Tiến hành lặp Toàn Bộ PHP Code: <albuminfo> <artLocation><?php

Ngày đăng: 14/12/2013, 17:16

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan