php connect

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

php connect

Post by Vegan »

i have an available database in an unorthox format (MSFT jet) and I can export it, so I was wondering about a specialized database

the idea was for my vegan site which used WP but I am not sure if I can do that is to use the second database to grab nutrition information a food item such as green beans etc

I am not sure if I would have to customize WP or what?
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: php connect

Post by requinix »

Jet? HA. That's an old one.

Export for sure. Afterwards you either force the database into your existing schema or you store the data someplace new and write WP plugin(s) to do whatever you need with it.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: php connect

Post by Christopher »

Vegan wrote:i have an available database in an unorthox format (MSFT jet) and I can export it, so I was wondering about a specialized database
When you say "database" do you mean one table or multiple tables with relations?
(#10850)
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

Re: php connect

Post by Vegan »

The database came from the old USDA nutrient information system

The program using it does not work with more recent versions of Windows so the tables are now on the USDA web page wit a search box

The file has several tables and it looks like there are some relational links too
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: php connect

Post by Christopher »

If you mean the USDA National Nutrient Database, it is available for public download. It is very easy to import and easy to automate the import. The delimited files are caret delimited and tilde quoted. You can import it into a database. I recall that the schema and a shell script importer is available.
(#10850)
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

Re: php connect

Post by Vegan »

Sounds like with some help i can realize my goals of more ntrition information for recipes etc

need to take a break, beat from getting my dasebase up so that i can post more web sites

used to have 20MB now i have 20GB to 2PB as needed and dramatically faster
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
Post Reply