PDA

View Full Version : Tracking sales in one column


webmusic
04-10-2003, 06:10 PM
In regards to running a shopping cart, is it possible to track items that a customer has purchased using only one column, such as with a field name of "products"? Each time the cust visited the site and purchased more items, it would add to the same list. Also, if the cust wanted to view what they have previously purchased, can the data be pulled and sorted to a list on a webpage? I would imagine the data could be stored like item1,item2,item3,etc, in the same column? Using MySQL version 3.23.54.

raf
04-10-2003, 08:02 PM
I'm sorry, but this is not a free coding service. All the things you ask for are possible.

I'm not wanna put you down or frustrate you, but i think it would be better for you if you search a tutorial or book on building databasedriven websites.

This is a very short and useful tutorial fro your first steps

http://www.sitepoint.com/article/228/2

webmusic
04-10-2003, 08:16 PM
Thanks raf,

I didn't want anyone to write the code for me, I just needed to be pointed in the right direction.

raf
04-10-2003, 08:28 PM
Then your at the right place. :thumbsup:
Welcome.

First of all, why not install MySQL 4.0 or 4.1 ?
Check here
http://www.mysql.com
This site will answer most of your MySQL questions.
Run a searc for MySQL-front or phpMyAdmin if yu need a db-front

Secondly, what scripting language are you going to use?
I'd suggest PHP.
http://www.php.net
will cover most (if not all) PHP issues

(if you start from scratch, check out firepages packages !)
http://www.firepages.com.au

And for punctual questions or problems, theres still this place.

webmusic
04-10-2003, 08:35 PM
Thanks again,

I'm used to using Perl and Java, but I'm willing to give PHP a shot if you think it will be best for my needs. I'll check out the sites.

raf
04-10-2003, 09:02 PM
Stick with perl and Java
and only use PHP for the quick-and-dirty stuff

Spookster
04-11-2003, 12:02 AM
Originally posted by raf
Stick with perl and Java
and only use PHP for the quick-and-dirty stuff

That's not right.

PHP is not just for quick and dirty stuff as you put it. It's easier to learn and as powerful as either of those languages. Even more powerful in the fact that you can run PHP anywhere in your site and not have to restrict to running stuff from a CGI-BIN, And in regards to Java(JSP) then PHP runs faster and is more stable.

I learned Perl ,Java and JSP before I ever started with PHP and I would never recommend going back to those previous one for server-side web development.

raf
04-11-2003, 12:12 AM
Didn't expect a different answer from you :D
No point in arguing about this. I'm building my first app in PHP now and i love it, but for critical processes, i wouldn't rely on it.

But it's quicker to write and debug. If it needs to have industrial strenght, safety, modularity and stability, then i personally prefer Java. And so do most softwarehouses (Not to mention OO)
Java slower? Jeah, it'll always be a bit slower, but speed isn't always the only (or even the most) important thing.

Depends on what sort of stuff you're developping and how reliabel it needs to be.

Spookster
04-11-2003, 03:26 AM
Originally posted by raf
Didn't expect a different answer from you :D
No point in arguing about this. I'm building my first app in PHP now and i love it, but for critical processes, i wouldn't rely on it.

But it's quicker to write and debug. If it needs to have industrial strenght, safety, modularity and stability, then i personally prefer Java. And so do most softwarehouses (Not to mention OO)
Java slower? Jeah, it'll always be a bit slower, but speed isn't always the only (or even the most) important thing.

Depends on what sort of stuff you're developping and how reliabel it needs to be.

Of course I am going to be pro PHP. :) Perl is outdated and was never meant originally to be a web scripting language (no arguing that). JSP is fine but it is slow and speed is an important factor in a site. People don't like to have to wait long for a site to load.

PHP has OO capability; not as concise as Java albeit but it does have it. PHP is as secure as Java. You can have modularity in PHP. As far as strength and stability maybe you know something that the rest of us and the programmers and engineers at Yahoo don't know?

http://public.yahoo.com/~radwin/talks/yahoo-phpcon2002.htm

Wait til my fellow PHP mod get's here. Then we will gang up on you. :D Resistance is futile.

webmusic
04-11-2003, 05:29 AM
Just skimmed the PHP site quick before I went to work and noticed that in connecting to a MySQL database, the login variables are shown in the webpage. Is this correct? How secure is that..........?? Maybe I have more reading to do.

Spookster
04-11-2003, 06:32 AM
Originally posted by webmusic
Just skimmed the PHP site quick before I went to work and noticed that in connecting to a MySQL database, the login variables are shown in the webpage. Is this correct? How secure is that..........?? Maybe I have more reading to do.

They will be in the page whether you use PHP, Perl or JSP or ASP. They are not however sent to the browser. The way any server-side language works is when the page is requested by the browser whether it is .php .asp .jsp .pl etc is then sent to whatever parser/engine is set up to handle that file. The parser then strips out the server-side coding and processes it and then replaces it with any HTML/Client-side code that was outputted from the server-side code. The server side coding doesn't ever get sent to the browser. So to answer your question, it is quite secure. The only time it is not secure is if the parser/engine fails or something goes wrong with the web server and then the server-side code can end up being sent to the browser. But if your smart you won't put database logins in the main pages. You will be smart and put them into include files and place them in non-web-accessible folders.

raf
04-11-2003, 09:07 AM
Don't know what you do for a living, but i'm a project manager at a quite large holdingcompany in the financial sector.

and we don't use PHP and will never consider using PHP. We choose to let the client loose 1 second of his time instead of (taking even the slightest risk of ) losing a million. There's more to building an app or an architecture then just a webfront for your db.

Anyway, as i pointed out: no use in discussions like this.

Spookster
04-11-2003, 09:24 AM
Originally posted by raf
Don't know what you do for a living, but i'm a project manager at a quite large holdingcompany in the financial sector.

and we don't use PHP and will never consider using PHP. We choose to let the client loose 1 second of his time instead of (taking even the slightest risk of ) losing a million. There's more to building an app or an architecture then just a webfront for your db.

Anyway, as i pointed out: no use in discussions like this.

And the fact that your a "project manager" is suppose to sway the facts how? Well i'm a database engineer for the world's leading producer of fiber optic cable. Ok that really has no relevance here but I also do web development for a major university and I run a web development company on the side. I do much programming in both standalone software and web based software.

Please enlighten the rest of the world as to how you think PHP does not have "industrial strength, safety, modularity and stability."

Am I safe in assuming Yahoo has more clients, is larger and handles more traffic than your company? They are switching to PHP in case you didn't actually go to that link I posted.

As for taking a risk any smart "project manager" would have risk managment procedures in place to handle any situations. When you develop any software you don't just slap it together and hope it works. You utilize proper software engineering concepts as I imagine you should be familiar with since you are a "project manager." :thumbsup:

raf
04-11-2003, 09:31 AM
You obviously didn't quite get the message.

Spookster
04-11-2003, 10:16 AM
Originally posted by raf
You obviously didn't quite get the message.

My translation of your post was "I'm a project manager at a large company so I know what I am talking about and you don't."

There was really no point for a comment of that nature. I rebutted that with where you work really doesn't matter. Your company is probably very small compared to Yahoo whom their "project managers" say PHP can handle quite nicely the things you say it can't.

You stated your personal opinion as if it were a fact but failed to actually provide any facts to substantiate your claim.

raf
04-11-2003, 11:11 AM
I wasn’t going to make a discussion, but you brought this on a personal level (why?) and pissed me off.

For starters, there’s not one constructive contribution in your post, unless you count ‘PHP is great cause Yahoo uses it and it can compete with anything’-shouting as constructive
In specifying what I do for a living and what choices we make there, I was merely pointing out that there are market segments where it’s not all about speed. And where the web distribution isn’t the major issue. Maybe I should have put “where I work” to please you, but then there isn’t an argument any more.
Am I safe in assuming Yahoo has more clients, is larger and handles more traffic than your company?
This is your answer to that? Do you know why they choose PHP? I hope you don’t believe the window-dressing in there slideshow?
Or what did I read in the paper today. They went from a 56 million $ loos to a 46 $ profit. (company I work made over 1 billion $ profit last year. case you wonder who’s got the biggest. And it is larger. Both the IT division as the overall company. In case you wonder who’s got the biggest.) Because they (Yahoo) use PHP? Probably part of it cause it lets you cut down on the development and implementation costs. But most of the gain comes from fixing search result: you pay, so you get on top.
Do you really think technical argument were the key issue in their decision? Common! What are the requirements or the average lifetime of a yahoo page or most functionality? They don’t mind redoing pages or parts of their site on a continuous base! They probably think (or want you to think) of it as “evolving”, “keeping up” + they bonded with the open source “community”. or is it “communism”?
I’m almost afraid to say it, but I’ve got a major in psychology (Hey Spookster !! Be sure to pick on this !! Me having a major in psychology is really the key issue here !!) and it’s probably the oldest trick in the book. Both promotionally as businesslike.
So I really can’t see how you can compare Yahoo with financial transaction applications or architectures. They have nothing in common. Unless you think Yahoo minds if a results page isn’t 100% accurate? (they already sold out) Not 1 functionality, they absolutely don’t have the same requirements. But why would you mind? No need looking in to that or considering that, hey Spookster ! No !! He’s a project manager !! Ohoh. You really got the key-issue there !! You know, at work, I don’t write 1 line of code. I deal with requirements and functionality’s. Others then decide what technology best fits these.
This was one of the points I was trying to make.
In my previous job I also worked as a project manager (did it again !!) for a governmental organization. They also picked Java for all core-processes and web distribution because that fitted best their requirements.
If it needs to have industrial strenght, safety, modularity and stability, then i personally prefer Java. And so do most softwarehouses
What word did you not understand in this sentence? Personally? Prefer? Most?
I’m sorry I didn’t ask permission to have/express a personal preference.
Why you read/transcript this as
Please enlighten the rest of the world as to how you think PHP does not have "industrial strength, safety, modularity and stability."
Well, I don’t have a clue. Prejudices? Partiality? There not my words or thoughts so you explain that. I didn’t try to ridiculize you so why are you? I really hope you show some more professionalism at work.

… is suppose to sway the facts how?
What facts? I’ve read and reread your posts and all facts that I found are
“PHP has OO capability” (Wow !! Just bough some blank pages! Now I have Nobel Prize winning capabilities ?) “PHP is as secure as Java” (Wow !! Drunk driving a Jaguar is as safe as drunk driving a Fiat !!) Yahoo uses it !! And they’re so big they can’t be wrong !! Might be best for them but ….
In case you’ve misses : Enron went bust (myohmy, and they were so big. Naughty naughty managers !) world.com ? Why not all go exclusively for Microsoft products. Big ones can’t be wrong. Iraq has a really devastating army and is a worldwide threat …
Yahoo uses it. Please !

<edit>About your last post (type in this ofline when replyscreen was open)
Spookster : “My translation” --> Yes indeed.
Spookster : “Your company is probably very small compared to Yahoo whom their "project managers" say PHP can handle quite nicely the things you say it can't. What did I say ? Excuse me !? This is what i said .” I'm building my first app in PHP now and i love it, but for critical processes, i wouldn't rely on it.”. And Yahoo isn’t so big. Not in the real world it isn’t
Spookster : “You stated your personal opinion as if it were a fact”. Nope. Reread it. It’s not because you interpret it like that that i’ve done it
Spookster : “ your claim.” My claim? Which one. What do i claim ?


I hope you get the meaning of the above crys of anger and dispair.
</edit>



Not going to repeat myself anymore. It was all there in previous posts.

Aaaaaaaah. Glad I got rid of that.
Make promise to myself -->stick with principle from first reply and don’t get involved in discussions that don’t generate any code or original thought. No hard feelings on my part, Spookster.

Spookster
04-11-2003, 12:23 PM
I never brought it to a personal level, you did.

You started this by saying don't use PHP because it's not reliable or strong enough, or safe enough, etc to handle anything important. You stated that as if it were a fact.

It's not.

I contradicted that with a few miscellaneous facts of my own and posted a link that contained other facts about it. Then you made the argument personal by insinuating that you probably have a more important job than I and that you know more about this.

That's a bunch of nonsense. I have degree in computer science concentrated in systems and software engineering. I am quite fluent in many languages and concepts of programming.

Yahoo was just an example of a site that recieves billions of hits a day which I imagine is quite a lot more than your company's site? Monetary values have absolutely nothing to do with this so I don't even know why you brought it up. I was referring to web traffic. If you had half a brain you would have understood that.

You stated PHP is not strong enough to handle anything industrial strength. Matter of fact you sat their and accused me of not providing facts that prove PHP handles all of that but failed to even come up with one fact to support your claim that it cannot. You are such a hypocrit.

You also claimed that your "personal preference" of using java for the web is shared by most other companies. Yeah whatever. I'd love to see the facts that back that one up.


I simply asked you to provide some facts to back up this claim:



only use PHP for the quick-and-dirty stuff


If it needs to have industrial strenght, safety, modularity and stability, then i personally prefer Java. And so do most softwarehouses (Not to mention OO)


In all your senseless rambling there you never came up with one fact to support those.

To answer this question concerning Yahoo's decision:


Do you really think technical argument were the key issue in their decision?


Yes, as a matter of fact it was if you had actually read it.

You said I didn't provide any thing constructive to this debate? You better check yourself hypocrit. You diverged off on some tangent about financial issues that had nothing to do with this argument not to mention your other ranting and raving.

The bottom line is this:

PHP is just as reliable(actually more reliable) than JSP since the tomcat server likes to go down or get bogged down easily and requires much more attention and maintenance. A PHP run site can handle just as much traffic as a JSP site. PHP is just as secure as JSP. A site is as secure as the people who run it want it to be. PHP has object oriented capabilities and so does JSP. Modularity (if you actually knew what that meant) has nothing to do with the language. It's a software engineering term that essentially means you write your code into related blocks of independent code. PHP is just as stable as JSP.

And the last I heard PHP is being used on over 9,000,000 domains.

raf
04-11-2003, 03:10 PM
This is getting us nowhere.

You're reply is again just filled with wild accusitions, intentionally twisted quotations and "were so big and great" shouts.

But i'm gonna go through it once again with you. You know. Dogs that are barking all day behind there fence also think they can dominate erveryone that walks by, because they go away.So i’m gonna threat your whole post. (your complete text in bold)

I never brought it to a personal level, you did.
You started this by saying don't use PHP because it's not reliable or strong enough, or safe enough, etc to handle anything important. You stated that as if it were a fact.

You ammuse me. This is all manifestly not true. Read my previous post. Imorptant is not the same as critical. Safe? Strong? Stated as a fact. Please read my post and comments. I already treated this. This is pure spin of you.
And where is this personal? Or are you the incarnation of PHP? You shouldn’t believe what the write about you :D
I contradicted that with a few miscellaneous facts of my own and posted a link that contained other facts about it.
Do the terms windowdressing and imagebuilding mean anything to you? ‘Facts’ ?
Then you made the argument personal by insinuating that you probably have a more important job than I and that you know more about this.
Not true. I took plenty of time explaining why i brought it up. You’re just interpretating that. Why ? Really, think about that. I’m not hasseling you here. Why do you take offense on that? You’ve stated yourself you’ve interpreted it like that. You may interpret it as you like, and think of me whatever you want, but don’t start hasseling me with you’re opinion by displaying them on a public forum as if i’m just waving my badge

That's a bunch of nonsense. I have degree in computer science concentrated in systems and software engineering. I am quite fluent in many languages and concepts of programming.
What’s this? Did i ever doubt your computer knowledge? Or any other skills of you? Or is it inappropriate to point out that not all decissions are based on technological arguments? Do you think i never had to choose for a solution, just out of business or strategical needs?

Yahoo was just an example of a site that recieves billions of hits a day which I imagine is quite a lot more than your company's site?
As i explained over and over again: number of hits and responsetime are not always the only issues. Sometimes other requirement make other technologie more appropriate. Is this all about the term “quick and dirty” ? I think you’re smart enough to know what i mean by that.
Monetary values have absolutely nothing to do with this so I don't even know why you brought it up.
Maybe read your own post and my reply to that. Or doesn’t it suits you?
I was referring to web traffic. If you had half a brain you would have understood that.
Charming. So out of your list, you again take out the one thing that’s important for your example. Real nice! Who do you think your fooling? Half a brain? If you would have 1/10 of a brain, you would have already realised there’s more then trafic and pagehits. I’ve been over this so many times i start to wonder if you realise the difference between a webfront for a tradition compagnie, and a webservice.

You stated PHP is not strong enough to handle anything industrial strength.
Not true.Where? Read my reply. You yourself stated it’s an opinion. I even cald it a personal prefference
Matter of fact you sat their and accused me of not providing facts that prove PHP handles all of that but failed to even come up with one fact to support your claim that it cannot.
Now quotemaster. Quote me on that. This is so untrue. Anyone who reads my posts sees that. I never said PHP couldn’t do anything Java can. I did not provide any facts. In fact, i’ve stated numerous times that it depends on your requirements which technique you use.
You are such a hypocrit.
Excuse me?You absolutely don’t know me at all.
You also claimed that your "personal preference" of using java for the web is shared by most other companies. Yeah whatever. I'd love to see the facts that back that one up.
OK. Tell me what would prove that for you. What “fact” would you accept? That’s why i speak of preferences. You’re thinking this is the first time i had or witnessed this discussion?

I simply asked you to provide some facts to back up this claim:
quote:



only use PHP for the quick-and-dirty stuff


If it needs to have industrial strenght, safety, modularity and stability, then i personally prefer Java. And so do most softwarehouses (Not to mention OO)

In all your senseless rambling there you never came up with one fact to support those.
There’s no claim in there. Or do you mean i need to restate my personal preference?
Support those? My preferences? My opinion? What would you accept as facts? Other IT’ers preferences? Statistics on how many sites use a language? There’s so much PHP crap-code out there you wouldn’t even touch it
Hey, but go for volume if you like.

To answer this question concerning Yahoo's decision:
quote:


Do you really think technical argument were the key issue in their decision?



Yes, as a matter of fact it was if you had actually read it.
So imagebuilding and windowdressing doesn’t mean anything to you. What’s more, i never said it wasn’t the ‘best’ option for them. But it’s not a business and image-free decission. It almost never is in big project. As any IT’er knows. If you love Yahoo for that, just go ahead.

You said I didn't provide any thing constructive to this debate? You better check yourself hypocrit. You diverged off on some tangent about financial issues that had nothing to do with this argument not to mention your other ranting and raving.
Yeh, this is nice. Just do some smarling. Talk about small businesses, that i flash my ‘project manager status’, and when i take you up on it, snarl some more that it has nothing to do with the central issue.
As if you kept the focus on that. You did everything but that!
And you know why: there’s nothing to discuss about. Different requirement lead to different techniques. <--point
I really don’t get what you blame me for. What did i write down that was so terrably wrong (before you started attacking me personally)
Ranting and raving. Huh. That’s funny. So we can’t deal with the content, we take on the packaging. And whose doing the senseless rambling here? You’re just repeating the same old stuff without going in to any of my arguments. Not one, Spookster. Even the ‘answers’ on my rhetorical questions aren’t displaying sound business knowledge. (Which could also be seen as a compliment).

The bottom line is this:
Now it must be comming. The grand finale !!

PHP is just as reliable(actually more reliable) than JSP since the tomcat server likes to go down or get bogged down easily and requires much more attention and maintenance.
Have you read my posts. Are you diverging? Do you want to start a discussion on that (so you can blame me from diverging)?
A PHP run site can handle just as much traffic as a JSP site.
Here’s the traffic again. Hugh. I’m getting so tiered. Webservice <--> webfront
PHP is just as secure as JSP. A site is as secure as the people who run it want it to be.
Maybe you didn’t understand my drunk-driving metathor, but this is just what i said on the matter.
PHP has object oriented capabilities and so does JSP.
Sure. All people that are building OO frameworks are lurking at PHP.
Modularity (if you actually knew what that meant) has nothing to do with the language. It's a software engineering term that essentially means you write your code into related blocks of independent code.
Oh yeah. Thanks for clarifying that ! It was just a word i had lying around so i thought: “Might as well slip it in”. Reread my post. What i was thinking about was the J2EE suite with JBOSS as application server. The use of servlets, application independent messanger based communication. Look at me raving and rambling!! Maybe you can clarify on this. It’ll come inhandy for my next project!
PHP is just as stable as JSP.
Whatever that means or why you’re saying that. Hey, where dit JSP enter the frame? Let me look that up …
And the last I heard PHP is being used on over 9,000,000 domains.
Go for volume (both ways)
All really well coded. (otherwise it doesn’t run :D) As i said before, most of that code is crap-code you wouldn’t even touch.

Wanna call it a day? I have to, so i’ll give you the final say.

Spookster
04-11-2003, 03:30 PM
You know what, whatever, im tired of arguing with an obnoxious idiot who doesn't know his you know what from a hole in the ground.

webmusic
04-11-2003, 04:29 PM
I do hope you guys were good friends at one point in this thread, because I would hate to be the one that broke it up. :(
Whatever way I choose to do this, it will not be influenced by a peeing contest.
Thanks for all the input, and I hope all your output has relieved some tension.

raf
04-13-2003, 11:12 AM
Thanks for the concern and you probably posted the most sensible post:thumbsup: . All the rest was mostly a waste of time and i'm not exactly proud of it, but one outburst in 8 months is acceptable to me.

this sort a 'discussion' are quite rare here, so don't let this give you the wrong idea about this forum, or put you off.

whatever path you take, if you run into problems or have questions or just want some opinions, let us know.