# **------------------------------------------------**
# ** Creates MySQL table to store binary files      **
# **                                                **
# ** Download4J/MySQL 3.23, 4.x sample script.      **
# ** http://www.javazoom.net/jzservlets/download4j/ **
# ** Copyright JavaZOOM 1999-2004.                  **
# **------------------------------------------------**
# drop table DOWNLOAD;
create table DOWNLOAD (
	FILENAME varchar(255) NOT NULL, 
	BINARYFILE longblob,
	primary key (FILENAME)
);

# ** Read and inserts 4 sample files  **
insert into DOWNLOAD (FILENAME,BINARYFILE) VALUES ('protectedtest.pdf',load_file('c:\\temp\\protectedtest.pdf'));
insert into DOWNLOAD (FILENAME,BINARYFILE) VALUES ('globaltest.txt',load_file('c:\\temp\\globaltest.txt'));
insert into DOWNLOAD (FILENAME,BINARYFILE) VALUES ('ziptest.html',load_file('c:\\temp\\ziptest.html'));
insert into DOWNLOAD (FILENAME,BINARYFILE) VALUES ('jchatbox.gif',load_file('c:\\temp\\jchatbox.gif'));
