angelamartin
03-21-2007, 05:45 PM
Hello,
What's the SQL statement for adding a
CATEGORY, SUB CATEGORY, and ADD LISTING
like:
Arts [CATEGORY]
- Literature [SUB CATEGORY]
- Book Spot [LISTING]
This is a free resource center that simplifies the search for the best book-related content on the Web. From the site, quickly and easily find bestseller lists, book awards and reviews, electronic texts, online booksellers, antique books, author and publisher information, literary criticism, book news and events, and much more.
Thanks a lot.
-angela
Sai_dallas
03-21-2007, 07:01 PM
That is the default, how the directories work.
Not sure, what is your question.
Thanks
Dave Baker
03-21-2007, 07:05 PM
Welcome to our forum angela!
For a Category:
If your Category(Arts) has id = 1
INSERT INTO `v2102_categories` (`id_editor`, `id_parent`, `title`, `description`, `status`, `meta_description`, `meta_keywords`, `path`, `order`, `locked`, `unique_tpl`, `level`, `num_cols`, `neighbour`, `num_links`, `num_all_links`) VALUES (0, 1, 'category_from_sql', '', 'active', '', '', 'category_from_sql', 0, '0', '0', 1, NULL, NULL, 0, 0);
{prefix} - replace with your prefix
For a Subcategory:
If your Subcategory(Literature ) has id = 2
INSERT INTO `{prefix}categories` (`id_editor`, `id_parent`, `title`, `description`, `status`, `meta_description`, `meta_keywords`, `path`, `order`, `locked`, `unique_tpl`, `level`, `num_cols`, `neighbour`, `num_links`, `num_all_links`) VALUES (0, 2, 'category_from_sql', '', 'active', '', '', 'category_from_sql', 0, '0', '0', 1, NULL, NULL, 0, 0);
id of category you can check via phpMyAdmin
For a new listing:
INSERT INTO `{prefix}links` (`id_editor`, `domain`, `url`, `description`, `email`, `reciprocal`, `recip_valid`, `ip_address`, `link_header`, `status`, `pagerank`, `rank`, `date`, `owner`, `comment`, `clicks`, `partner`, `partners_start`, `featured`, `feature_start`, `sponsored`, `sponsored_start`, `sponsored_plan_id`, `sponsored_tid`, `comments_active`, `comments_total`, `num_votes`, `rating`, `min_rating`, `max_rating`, `title`, `last_check_date`, `cron_cycle`, `sponsored_notif_sent`, `notif_sent_date`) VALUES (0, 'ww.test.com', 'http://ww.test.com', 'It'' my description It''s my description It''s my description', 'admin1@admin1.com', 'http://', '0', '127.0.0.1', 200, 'active', -1, 0, '2007-03-19 22:37:21', 0, '', 0, '0', NULL, '0', NULL, '0', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 'wwesda', NULL, '0', '0', NULL);
angelamartin
03-22-2007, 12:14 AM
Thanks Dave,
That's what I need. I will try to simulate that SQL soon.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.