RLIB Programmers Manual - RLIB - SICOM Systems, Inc.
RLIB Programmers Manual - RLIB - SICOM Systems, Inc.
RLIB Programmers Manual - RLIB - SICOM Systems, Inc.
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Chapter 8. Examples<br />
Example 1<br />
It is assumed that you have a working PHP, APACHE, and MySQL setup. You will have to<br />
substitute the MySQL host, username, password, and database to what ever you created. The<br />
example is in three sections. First creating the database. Second we create the PHP source. Third<br />
we create the <strong>RLIB</strong> XML file.<br />
MySQL Table Creation<br />
DROP TABLE IF EXISTS example;<br />
CREATE TABLE example (<br />
rn INT NOT NULL AUTO_INCREMENT,<br />
name VARCHAR(30) NOT NULL DEFAULT "",<br />
type INT NOT NULL,<br />
price FLOAT NOT NULL,<br />
PRIMARY KEY (rn),<br />
KEY (name)<br />
);<br />
INSERT INTO example (name, type, price)<br />
VALUES<br />
("Hammer", 1, 10.00),<br />
("Screw Driver", 1, 7.00),<br />
("Bolts", 1, 2.00),<br />
("Hot Dog", 2, 1.50),<br />
("Soda", 2, 1.00),<br />
("Chips", 2, 1.00),<br />
("Jaguar", 3, 50000.00),<br />
("Lexus", 3, 60000.00),<br />
("Pinto", 3, 2000.00);<br />
PHP Source<br />
<br />
<strong>RLIB</strong> XML SOURCE<br />
<br />
36