Hi everybody, and thank you in advance. I'm new to this forum and to PHP/MySql. I've a table:
CREATE TABLE IF NOT EXISTS `Test` (
`ID` INT NOT NULL AUTO_INCREMENT ,
`Parent` VARCHAR(45) NOT NULL ,
`Child` VARCHAR(45) NOT NULL ,
PRIMARY KEY (`ID`) )
ENGINE = InnoDB;
INSERT INTO `Test` (`ID`,`Parent`,`Child`) VALUES ('1', 'X', 'a');
INSERT INTO `Test` (`ID`,`Parent`,`Child`) VALUES ('2', 'X', 'b');
INSERT INTO `Test` (`ID`,`Parent`,`Child`) VALUES ('3', 'X', 'c');
INSERT INTO `Test` (`ID`,`Parent`,`Child`) VALUES ('4', 'Y', 'a');
INSERT INTO `Test` (`ID`,`Parent`,`Child`) VALUES ('5', 'Y', 'b');
INSERT INTO `Test` (`ID`,`Parent`,`Child`) VALUES ('6', 'Z', 'a');
INSERT INTO `Test` (`ID`,`Parent`,`Child`) VALUES ('7', 'W', 'a');
INSERT INTO `Test` (`ID`,`Parent`,`Child`) VALUES ('8', 'W', 'b');
INSERT INTO `Test` (`ID`,`Parent`,`Child`) VALUES ('9', 'W', 'c');
The idea is to print, using PHP (in a HTML page), this (for every parent every child into the table): X
a
b
c
Y
a
b
Z
a
W
a
b
c
Do you have an idea/suggestion to make that? Thanks