/    Sign up×
Community /Pin to ProfileBookmark

How do I store data to allow me to generate report?

Hi,

I’m looking for some help with using PHP and MySQL. It’s more the theory than the technical stuff!

I have a client who wants to know what people are adding to their shopping cart, irrespective of if they actually buy. From this, be able to see this information over a given timescale (last week, last month, last 7 days etc).

The only way I can think to generate this information is to create a table that has fields for a date and stock number. Then, every time an item is added to the cart, I add a new row with this information. I can then extract the information when the client wants it.

My concern is that the table could, potentially, be massive!

Is there any other way to store data that would be able to generate the reports mentions?

Thanks in advance,
Danny

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@themartyMay 25.2009 — > My concern is that the table could, potentially, be massive!

What do you call massive? A few million records for example, is peanuts for a database.
Copy linkTweet thisAlerts:
@design-dwauthorMay 25.2009 — What do you call massive? A few million records for example, is peanuts for a database.[/QUOTE]

In that case, unless anyone can suggest a better way, I'll try out my theory and see how it goes!!

Thanks
×

Success!

Help @design-dw spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...