Jump to content

Recommended Posts

Hi,

Hi,

I'm having a hard time trying to figure out a simple way to do this. Would really be glad of any advise . Thanks . Swati

a. I have a db with some 70 odd tables.

b. 4-5 of the tables are Reports which include fields with text data - that run into several pages , so i define those fields as long text. This is getting unmanageable now

c. I would like to define the field where the text data is such that it points to a path on the server where i have created a folder where word files can be stored.

d. Basically, i would like to convert all the data in a text field into a word file and each time the record is called, the word file will also open up for updation. So the fields in the scripts below for problem, work done, status would all come in a single word document that would be stored in a folder say $file_dir="service/";

e. Thereafter, i would like to be able to both view and email the entire document as and when required.

f. How do i define the path for these text fields in the UPDATE statement that i currently use below ?  I need to indicate that the text represented by $status for example, resides in a document on a folder on the server and not in the database . If $status has to be something like \service\userid\company.doc then will `Status` = ' \service\userid\company.doc ' in the foll UPDATE Statement ? If i replace $status below with ' \service\userid\company.doc ' , I get an error.

[code]$sql = "UPDATE `Services` SET `Productid`='$id', `Company`='$customer', `BusinessCity`='$biz_city',  `LastName`='$last_name',`ServiceRequestDate`='$ireq_date',`ServiceDate`='$Service_date', `Model`='$model', `Specs`='$specs', `SerialNumber`='$serial_number',`Type`='$type',`ProblemReported`='$prob_reported',`WorkDone`='$work_done',`AuthorisedBy`='$authorised_by', `Status`='$status' WHERE `Serviceid`='$Serviceid' ";

$result1 = mysql_query($sql)
    or die (mysql_error() ); [/code] 


This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.