Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS SQL 2000 databse update with PHP scripts

Status
Not open for further replies.

CatPlus

Technical User
Jan 30, 2003
236
Dear PHP experts!

Two tables, besides others on a Microsoft SQL 2000 database are:

(1) Member Profile
(2) Member Activity

(1) Includes Member profile including ID, user name, address, telephone, e-mail address, password, password challenge questions, etc.

(2) Includes Member's order details including date order placed, items, unit and extended price, etc.

For (1), a PHP will connect to the SQL 2000 database and dump a file to an e-mail address provided. The file will be uploaded into a local database on a LAN not connected to the SQL 2000

For (2), a PHP will connect to the SQL 2000 database, delete all records in a table and upload all records from a CSV file

Please help help me with coding the two PHP scripts

Thank you
 
Dear CatPlus' employer,

Please get a professional coder in to do the job.

Jeff
 
i agree with Jeff. we're here to help with specific queries not to do your commercial programming for you.

your scripts will need to do

database select
email send
database insert
database delete; and a
csv parse coupled with database insert

the php.net online documentation will help you with the database functionality. the php bits of it are pretty much the same, you will need to be familiar with writing sql but if you administer an MS SQL db i'd guess this bit you can do.) if you have problems with any particular aspect come back and ask us a specific question. we're happy to help - check the FAQ's first (particularly sleipnir214's FAQ on debugging) and in your post tell us what you have done by way of self-help so we don't spend our time replicating what you have already done.

for email send, use the php mail() function. i wouldn't bother assembling a file and attaching it, just put the data directly into the body of the message. if you need to assemble a file first, use the fopen and fwrite php commands. these are in the php.net online manual. attaching a file to an email is simple but remember to encode it first. again the php.net online manual will tell you how to do this under the section on mail().

the csv parse functionality you should handle using fgetcsv(). again the php.net online documentation is the best place to go learn about this stuff.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top