SQL Inventory

List of all SQL mentioned in the code..

ValueCountFile:Line
'Delete category'
1
  • /application/view/admin/content/delete_category.php
"    INSERT INTO `posts_meta` (`id`, `posts_id`, `meta_key`, `meta_value`)
            VALUES
                (58, 112, 'scaffold_data', 'a:6:{s:9:\"post_type\";s:9:\"type-post\";s:13:\"post_category\";a:1:{i:0;s:1:\"1\";}s:11:\"bread_crumb\";s:0:\"\";s:13:\"meta_keywords\";s:0:\"\";s:16:\"meta_description\";s:27:\"Enter your comments here...\";s:4:\"tags\";s:0:\"\";}')"
1
  • /application/model/migration.php
"INSERT INTO `terms` (`id`, `name`, `slug`)
                                    VALUES
                                        (1,'Default','default'),
                                        (2,'Design','design'),
                                        (3,'Category','category'),
                                        (4,'Books','books'),
                                        (5,'Music','music'),
                                        (6,'Bikes','bikes')"
1
  • /application/model/migration.php
"INSERT INTO `term_taxonomy` (`id`, `term_id`, `taxonomy`, `description`, `parent`, `count`)
                                    VALUES
                                        (1,1,'category','',0,0),
                                        (2,2,'category','',0,0),
                                        (3,3,'category','',0,0),
                                        (4,4,'category','',0,0),
                                        (5,5,'category','',0,0),
                                        (6,5,'category','',0,0)"
1
  • /application/model/migration.php
"INSERT INTO `options` (`id`, `key`, `value`, `autoload`)
                                    VALUES
                                        (1, 'appearance', 'tentacle', 'yes'),
                                        (2, 'blogname', 'Tentacle CMS', 'yes'),
                                        (3, 'blogdescription', 'Just another tentacle in the sea.', 'yes'),
                                        (4, 'siteurl', '', 'yes'),
                                        (5, 'admin_email', 'admin@email.com', 'yes'),
                                        (6, 'image_thumb_size_w', '150', 'yes'),
                                        (7, 'image_medium_size_w', '300', 'yes'),
                                        (8, 'image_medium_size_h', '300', 'yes'),
                                        (9, 'image_large_size_w', '600', 'yes'),
                                        (10, 'image_large_size_h', '600', 'yes'),
                                        (11, 'image_thumb_size_h', '150', 'yes'),
                                        (12, 'db_version', '100', 'yes')"
1
  • /application/model/migration.php
"INSERT INTO `posts` (`id`, `parent`, `menu_order`, `author`, `date`, `modified`, `title`, `content`, `excerpt`, `comment_status`, `ping_status`, `password`, `slug`, `type`, `uri`, `visible`, `status`, `template`)
        VALUES
            (6, 0, 1, 1, 1322853969, 1328247576, 'Home', '<p><strong>Tentacle is an OpenSource Content Management System, it is free to use.</strong></p>\r\n<p>The goal is to help web professionals and small businesses create fast and flexible websites with the user in mind.</p>\r\n', '', 'open', 'open', '', 'home', 'page', 'home/', 'public', 'published', 'default')"
1
  • /application/model/migration.php
"INSERT INTO `posts` (`id`, `parent`, `menu_order`, `author`, `date`, `modified`, `title`, `content`, `excerpt`, `comment_status`, `ping_status`, `password`, `slug`, `type`, `uri`, `visible`, `status`, `template`)
            VALUES
                (112, 0, 0, 1, 1328502285, 1328560008, 'Welcome to Tentacle CMS', '<p>This is your first post!</p>\r\n', '', 'open', 'open', '', 'welcome-to-tentacle-cms', 'post', 'welcome-to-tentacle-cms/', 'public', 'published', 'default')"
1
  • /application/model/migration.php
"INSERT INTO `posts_meta` (`id`, `posts_id`, `meta_key`, `meta_value`)
            VALUES
                (7, 6, 'scaffold_data', 'a:5:{s:4:\"save\";s:0:\"\";s:11:\"bread_crumb\";s:0:\"\";s:13:\"meta_keywords\";s:0:\"\";s:16:\"meta_description\";s:0:\"\";s:4:\"tags\";s:0:\"\";}')"
1
  • /application/model/migration.php
"INSERT INTO `options` (`id`, `key`, `value`, `autoload`)
        VALUES
            (NULL, 'is_blog_installed', 'true', 'yes')"
1
  • /application/model/migration.php
"SELECT posts.*
                                    FROM
                                        term_relationships
                                    INNER JOIN posts
                                    ON term_relationships.page_id = posts.id
                                    INNER JOIN terms
                                    ON term_relationships.term_id = terms.id
                                    INNER JOIN term_taxonomy
                                    ON terms.id = term_taxonomy.term_id
                                    WHERE
                                        term_taxonomy.taxonomy = 'tag'
                                        AND terms.slug = '" 
$slug "'
                                        AND posts.status = 'published'"
1
  • /application/model/tags.php
"INSERT INTO `options` (`id`, `key`, `value`, `autoload`)
        VALUES
            (NULL, 'is_agree', '', 'yes')"
1
  • /application/model/migration.php
"UPDATE  `options` SET  `value` =  'tentacle' WHERE  `options`.`key` = 'appearance"
1
  • /application/model/migration.php
"INSERT INTO `options` (`key`, `value`, `autoload`) VALUES('active_modules', 'a:1:{i:0;s:5:\"ipsum\";}', 'yes');"
1
  • /application/model/migration.php
"UPDATE  `options` SET  `key` =  'active_plugins' WHERE  `options`.`key` ='active_modules';"
1
  • /application/model/migration.php
"INSERT INTO `options` (`key`, `value`, `autoload`) VALUES('blog_uri', 'blog', 'yes');"
1
  • /application/model/migration.php
"UPDATE  `options` SET  `value` =  '{$version}' WHERE  `options`.`key` ='db_version';"
1
  • /application/model/migration.php
"SELECT posts.*
                                    FROM
                                        term_relationships
                                    INNER JOIN posts
                                    ON term_relationships.page_id = posts.id
                                    INNER JOIN terms
                                    ON term_relationships.term_id = terms.id
                                    INNER JOIN term_taxonomy
                                    ON terms.id = term_taxonomy.term_id
                                    WHERE
                                        term_taxonomy.taxonomy = 'category'
                                        AND terms.slug = '" 
$slug "'
                                        AND posts.status = 'published'"
1
  • /application/model/category.php
"SELECT term_taxonomy.taxonomy
                                         , term_taxonomy.description
                                         , term_taxonomy.parent
                                         , term_taxonomy.count
                                         , terms.*
                                         , terms.name
                                         , terms.slug
                                    FROM
                                      terms
                                    INNER JOIN term_taxonomy
                                    ON terms.id = term_taxonomy.term_id
                                    WHERE
                                      term_taxonomy.taxonomy = 'tag'
                                    ORDER BY terms.name ASC"
1
  • /application/model/tags.php
"SELECT * FROM `statistics` WHERE `date` BETWEEN " $one_hour " AND " $now1
  • /application/model/statistics.php
"SELECT term_taxonomy.taxonomy
                                         , term_taxonomy.description
                                         , term_taxonomy.parent
                                         , term_taxonomy.count
                                         , terms.*
                                         , terms.name
                                         , terms.slug
                                    FROM
                                      terms
                                    INNER JOIN term_taxonomy
                                    ON terms.id = term_taxonomy.term_id
                                    WHERE
                                      term_taxonomy.taxonomy = 'category'
                                    ORDER BY terms.name ASC"
1
  • /application/model/category.php
"UPDATE $tick{$query->table->name}$tick SET "
1
  • /application/library/db.php
'Update ' $file_meta['file_name']
1
  • /application/view/admin/media/update.php
"UPDATE  `users` SET `data` = '{\"first_name\":\"Demo\",\"last_name\":\"User\",\"activity_key\":\"\",\"url\":\"\",\"display_name\":\"Demo User\",\"editor\":\"wysiwyg\"}', `registered` = 1340063724, `status` = 1 WHERE  `users`.`username` = 'demo';"
1
  • /application/controller/dev.php
"INSERT INTO `posts` (`id`, `parent`, `author`, `date`, `modified`, `title`, `content`, `excerpt`, `comment_status`, `ping_status`, `password`, `slug`, `type`, `menu_order`, `uri`, `visible`, `status`, `template`)
            VALUES
                (6, 0, 1, 1322853969, 1328247576, 'Home', '<p><strong>Tentacle is an OpenSource Content Management System, it is free to use.</strong></p>\r\n<p>The goal is to help web professionals and small businesses create fast and flexible websites with the user in mind.</p><p><strong>Username:</strong> demo<br /><strong>Password:</strong> demo<br /><a href=\'http://demo.tentaclecms.com/admin/\'>Admin</a></p>\r\n', '', 'open', 'open', '', 'home', 'page', 1, 'home/', 'public', 'published', 'default'),
                (112, 0, 1, 1328502285, 1328560008, 'Welcome to Tentacle CMS', '<p>This is your first post!</p>\r\n', '', 'open', 'open', '', 'welcome-to-tentacle-cms', 'post', 0, 'welcome-to-tentacle-cms/', 'public', 'published', 'default'),
                (113, 0, 1, 1340070422, 1340070422, 'Blog', '', '', 'open', 'open', '', 'blog', 'page', 2, 'blog/', 'public', 'published', 'template-blog');"
1
  • /application/controller/dev.php
"INSERT INTO `posts_meta` (`id`, `posts_id`, `meta_key`, `meta_value`)
            VALUES
                (7, 6, 'scaffold_data', 'a:5:{s:4:\"save\";s:0:\"\";s:11:\"bread_crumb\";s:0:\"\";s:13:\"meta_keywords\";s:0:\"\";s:16:\"meta_description\";s:0:\"\";s:4:\"tags\";s:0:\"\";}'),
                (58, 112, 'scaffold_data', 'a:6:{s:9:\"post_type\";s:9:\"type-post\";s:13:\"post_category\";a:1:{i:0;s:1:\"1\";}s:11:\"bread_crumb\";s:0:\"\";s:13:\"meta_keywords\";s:0:\"\";s:16:\"meta_description\";s:27:\"Enter your comments here...\";s:4:\"tags\";s:0:\"\";}');"
1
  • /application/controller/dev.php
"SELECT *, MATCH
            (title,content,excerpt) AGAINST('portfolio') AS
              relevance FROM posts WHERE MATCH
            (title,content,excerpt) AGAINST('portfolio') > 0 ORDER BY relevance DESC"
1
  • /application/controller/dev.php
"INSERT INTO `users` (`email`, `username`, `password`, `type`, `data`, `registered`, `status`)
                                VALUES
                                    ('
$email', '$user_name', '$encrypted_password', 'administrator', '{\"first_name\":\"$first_name\",\"last_name\":\"$last_name\",\"activity_key\":\"$hashed_ip\",\"url\":\"\",\"display_name\":\"$display_name\",\"editor\":\"wysiwyg\"}', '$registered', 1)"
1
  • /application/controller/action.php
"INSERT INTO $tick$table$tick $cols VALUES $vals"
1
  • /application/library/db.php
"DELETE FROM $tick{$query->table->name}$tick"
1
  • /application/library/db.php
"SELECT COUNT(*) AS {$tick}num{$tick} FROM $tick{$query->table->name}$tick"
1
  • /application/library/db.php
"SELECT DISTINCT * FROM $tick$table$tick"
1
  • /application/library/db.php
"SELECT DISTINCT $tickimplode("$tick,$tick"$cols) . "$tick FROM $tick$table$tick"
1
  • /application/library/db.php
"SELECT * FROM users WHERE
            data LIKE '%" 
$hash "%'
            ORDER BY id ASC"
1
  • /application/model/user.php
"SELECT uri, slug, id FROM posts WHERE uri LIKE '%$url%' and status = 'published'"
1
  • /application/model/content.php
"SELECT * FROM posts WHERE uri LIKE '%" $date "%'"
1
  • /application/model/content.php
"SELECT COUNT(*) AS total FROM `statistics` WHERE `date`  BETWEEN " strtotime('-4 hours'$time) . " AND " $time1
  • /application/model/statistics.php
"SELECT COUNT(*) AS total FROM `statistics` WHERE `date` BETWEEN '" strtotime('-4 hours'$time) . "' AND '" $time "' GROUP BY `ip` ORDER BY total DESC"
1
  • /application/model/statistics.php
"DELETE FROM term_relationships WHERE page_id=" $post_id2
  • /application/model/tags.php
  • /application/model/category.php
'Delete snippet'
2
  • /application/view/admin/content/content_delete.php
  • /application/view/admin/snippets/delete.php