Experts Exchange connects you with the people and services you need so you can get back to work.
SET NAMES utf8;
SET foreign_key_checks = 0;
SET time_zone = '+01:00';
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `categories`;
CREATE TABLE `categories` (
`tbl_categories_id` int(11) NOT NULL AUTO_INCREMENT,
`category_name` varchar(100) DEFAULT NULL,
`category_parent` int(2) DEFAULT '0',
UNIQUE KEY `tbl_categories_id` (`tbl_categories_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- 2013-10-17 22:40:09
INSERT INTO `categories` (`tbl_categories_id`, `category_name`, `category_parent`) VALUES
(1, 'cat1', 0),
(2, 'cat2', 1),
(3, 'cat3', 1),
(4, 'cat4', 1),
(5, 'cat5', 2),
(6, 'cat6', 3)
WHERE category_parent = 1
OR category_parent IN (SELECT tbl_categories_id
FROM (SELECT @r := (SELECT MIN(tbl_categories_id)
WHERE category_parent = @r) AS tbl_categories_id
FROM (SELECT @r := 1) vars,
| TBL_CATEGORIES_ID | CATEGORY_NAME | CATEGORY_PARENT |
| 2 | cat2 | 1 |
| 3 | cat3 | 1 |
| 4 | cat4 | 1 |
| 5 | cat5 | 2 |
Open in new window
ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.
One of a set of tools we're offering as a way to say thank you for being a part of the community.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.