1
middleton
php script to collect external db info
  • 2007/1/14 0:17

  • middleton

  • Just popping in

  • Posts: 30

  • Since: 2006/12/21


Hey Gang,

I'm looking to build a simple php script that will pull info from an external db, and save it into a simple tab/comma/pipe deliminated file. I'm then going to import this file into an existing MySQL XOOPS module db. I'm new to coding, did something similar in CGI, but not sure how to start in PHP.

Say, for example, it's a book list. Here's what I am trying to do: my existing .txt file has a list of book titles, one on each line. The php script should grab each title, execute an existing function, then open up a results file that saves an array of results onto a single line for each title. It's this results file that I will then fiddle with in mysql.

As in:
Loop
Grab the first line from my existing database
Echo "searching for 'title'..."
Execute a pre-built function (getInfo($title))
Open a results db file, enter the getInfo results array onto a new line (deliminated)
Save results file
Loop

I'm not sure if I'm making any sense. ;) I think it's probably simple to do, I've been looking into it but find php scripting more challenging than cgi.

Login

Who's Online

218 user(s) are online (126 user(s) are browsing Support Forums)


Members: 0


Guests: 218


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits