Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Using premade sql dump

Quote Reply
Using premade sql dump
Afternoon,

Purchased links SQL yesterday, and was wondering what the deal was with using a prebuilt sql dump to use to build up the catagories and such.

Basicly, i've spent a fair number of days building up a regions / countys / towns sql dump with id/town/parentid. From what i gather so far from playing around with it and searching around the forum, I would need to restructure the sql dump for towns to be how Links SQL does its thing (in the database) instead of using a seperate table to cross reference the results.

Was wondering if theres anyway around this? considering theres over 2050 towns in one sql dump, each having a parentid to the county they are in etc, and another sql dump table for the regions and again another for the countys, dont fancy rewriting that all over :)

The end result is listing the regions, then listing the counties in that region, then listing the towns in that county, then listing the contents of that town.

Any suggestions / links to where i could figure this out would be appreciated.
Cheers.
Quote Reply
Re: [ryanv2d] Using premade sql dump In reply to
Do you have an example of your current SQL Dump file?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Using premade sql dump In reply to
Sure, snippet from the list.

INSERT INTO location (id, place, parent_id) VALUES ( '', 'Abertillery', '4b');
INSERT INTO location (id, place, parent_id) VALUES ( '', 'Aberystwyth', '4g');

4 represents the region, the letter represents county the town is in.

The way i've been doing it to present the data by what town its in was to use the parent id against a location id in another table which has the data in.

Hope that makes sense, need more coffee :)
Quote Reply
Re: [ryanv2d] Using premade sql dump In reply to
Was there any reason for writing the SQL dump? I'm not sure that is going to be easy/possilbe to do what you are asking. Basically, each category needs the following;

Name, ID, FatherID, Full_Name, Description, and a couple of other fields. Do you have a text file you were working with? It may be possible to write a script that would import from a text file for you...

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Using premade sql dump In reply to
Well with there being 2050 or so towns alone, in my mind it was the easiest solution for the outcome that i wanted.

The towns have there own table, as do the regions and again for counties.

The data that is retrieved does have what you say below, this consists of :

ID / Description / cname / cmail / curl / posted / location

So the place table cross references with the data listing table (above) with the column location, which holds the ID of the location town. and allows the counts.

Sorry if this doesnt make sense, anything you want me to elaborate on?

Cheers
Quote Reply
Re: [ryanv2d] Using premade sql dump In reply to
To do something with the categories, you really need to have a basic text file for each section. You may even be able to use my Multi_Categoies plugin (http://new.linkssql.net/...age=Multi_Categories ) ... which lets you create categories with stuff like;

catname
cat:::catname
cat_sub:::/catname/cat

Does that make sense? A lot of the people who have used this plugin, say its very quick to do, and doesn't take anywhere near as long as doing it manually....

If interested, I may be able to sort you out with an evaluation copy....

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Using premade sql dump In reply to
sort of, havent gone through everything on links sql yet but read a bit about what you've just said.

not sure how this would speed things up considering i'd still need to completly write all the towns / counties / regions in, i take it this plugin (couldnt try the demo as the admin/admin didnt work on your site) builds a entry list of 200 or so entries to dump the catagories in?.

Thing that i'm getting at is that i really dont want to restructure the database from scatch again, obvously if what i have done is not possible to intregate into links sql then i dont have much choice.

But my main priority is to be able to cross reference by region > county > town.
Quote Reply
Re: [ryanv2d] Using premade sql dump In reply to
It may be worth contacting Gossamer Threads, or one of the other devlopers about this. As far as I know, its not possible to do what you are asking (via your SQL dump). I don't really have time to look into this further, sorry. I was hoping it would be a simple answer, but nothing is ever as it seems Tongue

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Using premade sql dump In reply to
heh aye, nothing ever is simple untill its done then its just too simple ya cant believe you didnt think of it before heh :)

no worrys, i'll figure it out :) ta for help.

Any other suggestions you can think off or anyone else please by all means reply :)