PDA

View Full Version : Basic category import


Luffe
03-13-2006, 03:21 PM
Hi

Is there a mod to add basic web directory categories in PhpLD 3.02 ??

I tried the 1 in the mod list, but i cant seem to find out how to use the sql file.

LuffE

Neticus
03-13-2006, 04:43 PM
Content visible to registered users only.

If you are using cpanel
1. Access phpmydamin
2. Select phpld database
3. Click 'SQL' in top bar menu
4. Copy and paste code from phpld-cats mod into query field.
5. Unselect 'show this query here again' Hit 'Go'.

But before doing this the mod says

''make sure you have the PLD_CATEGORY and PLD_CATEGORY_SEQ tables emptied before inserting''

After doing steps 1 and 2 - Tick/select these two from your phpld tables list then select 'empty' from drop down menu.
Then continue following install steps above from 3.

Of course if you have no categories to begin with then ignore emptying PLD_CATEGORY and PLD_CATEGORY_SEQ tables
and just follow steps 1 to 5 straight.

I think this is what you will do as your website currently has no categories or links.

p.s. if you didn't know already 3.03 just came out check Supporters forum for more details.


Net.

anon
03-13-2006, 06:01 PM
Net, i think you helped the guy into wiping out his site.

all i see is the setup when i visit his link :lol:

Luffe
03-13-2006, 06:05 PM
No worries , i was installing 3.03 :)

Thanks for the info, i will try again.

I get an error saying the row count doesnt match or something, I editted the sql dump file to fit my tables in db.

LuffE

Neticus
03-13-2006, 06:13 PM
Cool coz I was about to change my username lol

- Destructicus.

Luffe
03-13-2006, 06:15 PM
Ok, the 2 Rows are empty and i edited the sql file to fit row names,
Now i get this error:

#1136 - Column count doesn't match value count at row 1

What does this mean ?

Neticus
03-13-2006, 08:24 PM
Content visible to registered users only.

Oh hum...this means that a few more columns have been added to v303 since v2 making phpld-cats mod incompatible with 303.

As a test I updated the column counts for the first insert Arts and Culture. This was successful the category was written to database.

Old code
INSERT INTO `pld_category` VALUES (1, 'Arts and Culture', 'arts_and_culture', '', 0, 2, '0000-00-00 00:00:00', 1);

New code
INSERT INTO `PLD_CATEGORY` VALUES (1, 'Arts and Culture', '', 'arts_and_culture', '', '', 0, 2, '0000-00-00 00:00:00', 1, 0, 0);

as you can see more columns/values have been added to match row count.

The problem is, this now has to be done for every single category insert in the sql file. Bummer.

You can use the new code template for Arts and Culture and just apply the new value inserts to all the other old cat inserts. Nothing has to change of the old inserts just find the same places as in the new code to place the new values. So heres another example with Artists category:

Old
INSERT INTO `pld_category` VALUES (2, 'Artists', 'Artists', '', 1, 2, '0000-00-00 00:00:00', 1);

New
INSERT INTO `PLD_CATEGORY` VALUES (2, 'Artists', '', 'Artists', '', '', 1, 2, '0000-00-00 00:00:00', 1, 0, 0);

You will also have to capitalise PLD_CATEGORY in current sql file.

If this is all a bit tedious, i suppose you could find someone with v303 categories installation and ask them to copy their pld_categories and pld_categories_seq by sql to you. That way all relevant rows will be filled and no conflict. My directory is not a general so I can't help you there.


Net.