Log in Register FAQ Memberlist Search Welcome to RCF - WHF Forum Index
alt : test.swf
Welcome to RCF - WHF
4fx3.gif 
calendar_open_closeCalendar 
CSV and database help
Post new topic   Reply to topic View previous topic :: View next topic
Welcome to RCF - WHF Forum Index -> Talk PC Add To Bookmarks
CSV and database help
PostPosted: 03/07/2007 12:44 AM Reply with quote
Citation
Glenn I
Citation
Posts 2152
Word Cnt. 78,257
BDay Jun 15
Sign Gemini
Sex Sex:Male
Joined: Apr 22, 2005
Local time: 3:37 AM
Location: Upside down
australC_1xa.gif
I'm interested in putting an aircraft registration function on my site like this - http://www.casa.gov.au/casadata/regsearch/findairs.asp

You just enter a plane's registration (see the box under "quick search" in a box and the page opens a new window displaying all the relevant info on a plane such as owner etc...

This site has been running pretty slow lately and it takes too long to search for aircraft. You can download the entire register at http://www.casa.gov.au/casadata/register/datafiles.asp but it's in CSV and you'd need to be able to set up some kind of a database to display the results. Other web sites have this too and I might even extend it to international databases later on.

Does anyone know of where I can get some information to aid in this?
Back to Top
View user's profile Find all posts by Glenn I Send private message   Visit poster's website Phoogle Map
Re: CSV and database help
PostPosted: 03/07/2007 2:37 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 1:37 PM
Location: St Pete, FL
peace.gif
I took the CSV file, saved it in dbf format, then Imported it to my Test database, then Exported it in SQL format so that you can now Import it into any database that you want...

ACRFTREG.sql.zip

headbang
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: CSV and database help
PostPosted: 03/07/2007 2:54 AM Reply with quote
Citation
Glenn I
Citation
Posts 2152
Word Cnt. 78,257
BDay Jun 15
Sign Gemini
Sex Sex:Male
Joined: Apr 22, 2005
Local time: 3:37 AM
Location: Upside down
australC_1xa.gif
Ok thanks. So now what do I do? Ohh and this file gets updated regularly too so I need a quick simple way to add the updates Smile
Back to Top
View user's profile Find all posts by Glenn I Send private message   Visit poster's website Phoogle Map
Re: CSV and database help
PostPosted: 03/07/2007 3:19 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 1:37 PM
Location: St Pete, FL
peace.gif
There is no easy way that I know of to import a CSV file to a database without writing a utility to do it.  I know there is a MOD in the phpBB MOD Database that allows you to import and/or export Users via a CSV file.  It might be possible to modify it to work with this CSV file if it indeed has the ability to import into the phpBB table...

The first thing you do is import this SQL file into your database using phpMyAdmin.  Then you have to decide what you want to do with the data...

munky2
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: CSV and database help
PostPosted: 03/07/2007 3:25 AM Reply with quote
Citation
Glenn I
Citation
Posts 2152
Word Cnt. 78,257
BDay Jun 15
Sign Gemini
Sex Sex:Male
Joined: Apr 22, 2005
Local time: 3:37 AM
Location: Upside down
australC_1xa.gif
I just created a database and imported the file. Was I supposed to import it the the phpbb database?

With the data I want to set it up like this site http://www.rwy34.com/regsearch/

Enter a 3 letter code such as KSN and see how it displays the results
Back to Top
View user's profile Find all posts by Glenn I Send private message   Visit poster's website Phoogle Map
Re: CSV and database help
PostPosted: 03/07/2007 3:34 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 1:37 PM
Location: St Pete, FL
peace.gif
If this utility is going to be tied into your phpBB board, then the table should be imported into your Live forum database.  If you want to keep them completely separate, then you can use a separate database.  It probably would be easier to use the phpBB database functionality though in order to access the table, so it might be better if it was imported into the phpBB database...

If there isn't already a utility created for this, you can use the Template MOD that you have installed on your site to create a template that looks like the page from your link.  Then you will want to add the SQL functionality to make the page dynamic/interactive...

headbang
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: CSV and database help
PostPosted: 03/07/2007 3:39 AM Reply with quote
Citation
Glenn I
Citation
Posts 2152
Word Cnt. 78,257
BDay Jun 15
Sign Gemini
Sex Sex:Male
Joined: Apr 22, 2005
Local time: 3:37 AM
Location: Upside down
australC_1xa.gif
Ahh ok

I have the blank page template so all I do is set it up using html ie. the titles and fields etc... So how do I get the info from the file to display in the page? If that makes sense

eg.. Aircraft Type - (get this info from the databse to display here)
Back to Top
View user's profile Find all posts by Glenn I Send private message   Visit poster's website Phoogle Map
Re: CSV and database help
PostPosted: 03/07/2007 3:56 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 1:37 PM
Location: St Pete, FL
peace.gif
You would have to decide what you want to present based on the available data, then design a page for the results.  The SQL queries would take the input, then search the table and load the output variables that will be used in the output page.  The whole process would work very much like all of our forum pages work...

It's way past my bed time, so I'm going to call it a night.  We can deal with this more tomorrow...

headbang
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: CSV and database help
PostPosted: 03/07/2007 3:58 AM Reply with quote
Citation
Glenn I
Citation
Posts 2152
Word Cnt. 78,257
BDay Jun 15
Sign Gemini
Sex Sex:Male
Joined: Apr 22, 2005
Local time: 3:37 AM
Location: Upside down
australC_1xa.gif
Ok thanks. I'll leave it for now too. Time to go watch a movie  occasion9
Back to Top
View user's profile Find all posts by Glenn I Send private message   Visit poster's website Phoogle Map
 Post new topic  Reply to topic
Information
Welcome to RCF - WHF Forum Index -> Talk PC

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
All times are GMT - 5 Hours

Page 1 of 1


Add To Bookmarks

 
  
  


  Google

Powered by phpBB © 2001, 2005 phpBB Group

Page generation time: 0.0718s (PHP: 64% - SQL: 36%) - SQL queries: 54 - GZIP disabled - Debug on