Jump to content

storing & retrieving file in database


sneezy

Recommended Posts

Hello there,

 

I am learning php/mysql by doing a small project. The project is like "storing shopping list as a file in database and retrieve it" to update later on or  to generate reports. The confusion I am having is:

 

1. How to store a file with (n) number of records (a user can have (n) number of items in one shopping list).

2. Save this shopping list and retrieve it some other time.

3. How to store "New shopping list for every new trip" in the database?

 

I have 1 database containing 3 tables: shopping_list, item_master and brand_master

 

Any help/ link to the tutorial for working with the files will be appreciated.

 

Thanks

Link to comment
Share on other sites

Sorry about that!

 

I have installed XAMPP 1.7.4 on windows XP, mysql version is 5.0.7, php version 5.3.5

 

Item_Master has 1 column = item_name

Brand_Master has 1 column = brand_name

shopping_list has 4 columns = item_name, brand_name, quantity, file_name

 

What I want to do is:

 

1. Before going to shopping, I want to make a list and want that list to be stored in database as a file. This file should be saved as any name given. Later, anytime I should be able to open the file for printing or for any addition/ deletion.

 

2. So there could be "n" number of shopping lists with "n" number of items as every time we go for shopping we have new items in our list.

 

3. Lastly (at this moment), I want to generate an itemized report date-wise.

 

So far, what I have done:

1. Created database, tables and forms.

2. Connection between Database and forms (Entries done in Item_Master and Brand_master, shows up as a drop-down list in "shopping_list form"

3. I am trying to save it as a file and retrieve accurate data according to each file but don't know how to do it.

 

Hopefully am going by the rules this time.

 

Thanks!

 

Link to comment
Share on other sites

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.