1. Trang chủ
  2. » Công Nghệ Thông Tin

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

7 634 1
Tài liệu đã được kiểm tra trùng lặp

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

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Tài liệu lấy dữ liệu từ MySQL lặp theo cấu trúc XML docx
Thể loại Hướng dẫn
Định dạng
Số trang 7
Dung lượng 412,62 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

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

Trang 1

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:

`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`)

INSERT INTO `albumflash` (`id`, `urlhinh`, `casi`, `album`, `linkcas

i`, `linkalbum`) VALUES

( , 'images/album1.jpg', 'Ca Si 1', 'Album 1', 'http://hoangth.webdo anhnghiep.org/', 'http://hoangth.webdoanhnghiep.org/'),

( , 'images/album2.jpg', 'Ca Si 2', 'Album 2', 'http://hoangth.webdo anhnghiep.org/', 'http://hoangth.webdoanhnghiep.org/'),

( , 'images/album3.jpg', 'Ca Si 3', 'Album 3', 'http://hoangth.webdo anhnghiep.org/', 'http://hoangth.webdoanhnghiep.org/'),

( , 'images/album4.jpg', 'Ca Si 4', 'Album 4', 'http://hoangth.webdo anhnghiep.org/', 'http://hoangth.webdoanhnghiep.org/'),

( , 'images/album5.jpg', 'Ca Si 5', 'Album 5', 'http://hoangth.webdo anhnghiep.org/', 'http://hoangth.webdoanhnghiep.org/'),

( , 'images/album6.jpg', 'Ca Si 6', 'Album 6', 'http://hoangth.webdo anhnghiep.org/', 'http://hoangth.webdoanhnghiep.org/'),

( , 'images/album7.jpg', 'Ca Si 7', 'Album 7', 'http://hoangth.webdo anhnghiep.org/', 'http://hoangth.webdoanhnghiep.org/'),

( , 'images/album8.jpg', 'Ca Si 8', 'Album 9', 'http://hoangth.webdo anhnghiep.org/', 'http://hoangth.webdoanhnghiep.org/'),

( , '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.

Trang 2

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.

Trang 3

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>

Trang 4

<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.

Trang 5

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.

Trang 6

Sau khi xóa xong copy toàn bộ nội dung dán sang filealbuminfo.php

và savealbuminfo.phplạ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.

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

TỪ KHÓA LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm

w