 | CSV and database help |  |
Posted: 03/07/2007 12:44 AM |
|
|
|
|
|
| Citation |
| Posts |
2152 |
| Word Cnt. |
78,257 |
| BDay |
Jun 15 |
| Sign |
Gemini |
| Sex |
 |
|
|
|
Joined: Apr 22, 2005
Local time: 3:37 AM
Location: Upside down
|

|
|
|
|
 |
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 |
|
|
 | Re: CSV and database help |  |
Posted: 03/07/2007 2:37 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 1:37 PM
Location: St Pete, FL
|

|
|
|
|
 |
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
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: CSV and database help |  |
Posted: 03/07/2007 2:54 AM |
|
|
|
|
|
| Citation |
| Posts |
2152 |
| Word Cnt. |
78,257 |
| BDay |
Jun 15 |
| Sign |
Gemini |
| Sex |
 |
|
|
|
Joined: Apr 22, 2005
Local time: 3:37 AM
Location: Upside down
|

|
|
|
|
 |
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  |
|
|
 |
 |
| Back to Top |
|
|
 | Re: CSV and database help |  |
Posted: 03/07/2007 3:19 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 1:37 PM
Location: St Pete, FL
|

|
|
|
|
 |
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...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: CSV and database help |  |
Posted: 03/07/2007 3:25 AM |
|
|
|
|
|
| Citation |
| Posts |
2152 |
| Word Cnt. |
78,257 |
| BDay |
Jun 15 |
| Sign |
Gemini |
| Sex |
 |
|
|
|
Joined: Apr 22, 2005
Local time: 3:37 AM
Location: Upside down
|

|
|
|
|
 |
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 |
|
|
 | Re: CSV and database help |  |
Posted: 03/07/2007 3:34 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 1:37 PM
Location: St Pete, FL
|

|
|
|
|
 |
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...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: CSV and database help |  |
Posted: 03/07/2007 3:39 AM |
|
|
|
|
|
| Citation |
| Posts |
2152 |
| Word Cnt. |
78,257 |
| BDay |
Jun 15 |
| Sign |
Gemini |
| Sex |
 |
|
|
|
Joined: Apr 22, 2005
Local time: 3:37 AM
Location: Upside down
|

|
|
|
|
 |
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 |
|
|
 | Re: CSV and database help |  |
Posted: 03/07/2007 3:56 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 1:37 PM
Location: St Pete, FL
|

|
|
|
|
 |
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...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: CSV and database help |  |
Posted: 03/07/2007 3:58 AM |
|
|
|
|
|
| Citation |
| Posts |
2152 |
| Word Cnt. |
78,257 |
| BDay |
Jun 15 |
| Sign |
Gemini |
| Sex |
 |
|
|
|
Joined: Apr 22, 2005
Local time: 3:37 AM
Location: Upside down
|

|
|
|
|
 |
Ok thanks. I'll leave it for now too. Time to go watch a movie  |
|
|
 |
 |
| Back to Top |
|
|
 | 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
|
|
|
|
|