|
Alright, so I will be graduating from my university in May. Things have been going pretty well these past four years I think, I failed few classes and got pretty good grades in the ones I passed. Now, in this, my last semester, I am supposed to do a senior project. Basically I was to find a company or organization who wanted me to create something for them for free. Needless to say, 100% of the class is doing shit for friends and family and the rest (including me) are doing shit for faculty. Every single project is a database, and we are all totally fucking psyched to be apart of this intese, realistic system development experience.
My problem is that I've finally run out of steam. I've been in school all my life, and this first half of the semester I've been unsuccessfully attempting to remember what little I knew about ASP and server side scripting. I can't study anymore, I just go limp and start frothing at the mouth. I've studied computer science at this university for four years and they want me to make a goddamn database for my final project? Death by dullness, I can't muster the strength to learn another boring database interface, because I'm just too spent.
I found a webspace provider where I could fiddle around and try to figure stuff out, but it's just been so long since I did this stuff that I keep getting error messages or scripts that translate to pure code on the page. So far, I've tried something as simple as a page for updating an existing SQL database through PHP scripting as well as querying it. Both have given me very little to nothing, as I just don't know what the hell I'm doing.
I've googled hundreds of tutorials and crawled myself through about half of them, trying their little snippets of code that don't work and not understanding what the hell they are talking about. For starters, the one class I took on this subject was in ASP but my webhosting only has PHP, and I don't even know what the significance of that is! I'm just so completely burned out, but I have to make this final sprint to the finish line!
Tl:dr,
So, I am begging for help. I'm not asking to be teached, I've tried that and I can't handle it anymore. I'm asking for the basic code for a web interface to
Update an SQL database through one or more textboxes and a button and
Query this database through the use of drop down lists.
If I can get those two vital building blocks going, I believe I have enough knowledge to figure the rest out on my own. I know how databases work, I know SQL, I just don't know how to use it with PHP on a webpage.
Please help me out, I just want to get this incredibly dull load off my shoulders so I can concentrate on my other classes and graduate this summer.
|
No offense, but you've been studying comp sci at uni for > 4 years and you ask for help about this?!!!!!
|
Four years and you don't know the difference between ASP and PHP? Sounds like you need to retake a few classes, especially since two of your courses were on database and web development.
|
On March 26 2009 07:06 Osmoses wrote: I've googled hundreds of tutorials and crawled myself through about half of them, trying their little snippets of code that don't work and not understanding what the hell they are talking about. For starters, the one class I took on this subject was in ASP but my webhosting only has PHP, and I don't even know what the significance of that is! Tell your teacher that you want to redo the four years.
|
I'm an IS major and know SQL/PHP/etc pretty well and barely any C++/C#/etc. I assumed computer science majors are the exact opposite, so how can you expect them to work in a language that is the least related to their field? (I could be mistaken here)
So, I am begging for help. I'm not asking to be teached, I've tried that and I can't handle it anymore. I'm asking for the basic code for a web interface to
Update an SQL database through one or more textboxes and a button and
Query this database through the use of drop down lists.
Just use codeigniter http://www.codeigniter.com
As long as you understand the basics you can pretty much code whatever you want with ease
|
Kyrgyz Republic1462 Posts
You "know" SQL, but you can't figure out a 3 lines long PHP script that executes a statement on a database?
You spent 4 years "studying" computer science and you can't understand a simple PHP tutorial?
PHP+SQL is easily one of the most popular subjects on the web, there are hundreds of tutorials doing exactly what you want, and you ask people to put it down here for you?
It is "too dull" for you, is it? Sorry, but you don't deserve to graduate if you are that useless.
|
Also I will send you a project I already have complete for $1000 if you are interested
|
United States4991 Posts
??? Why don't you just use phpmyadmin if you're using mysql, or the equivalent for whatever db you are using? (most commercial webhosting will come with this btw) Also echoing what R1CH said, lol.
Setting up something so anyone can execute queries from a textbox is massively insecure
fyi if you want to pursue original thing look up mysql_connect, mysql_query, and mysql_fetch_object. Those are probably the only PHP/mysql functions you will need to use. e: well you'll need to use those anyway if you are using the database in your page I guess, lol.
Or I'll write you your little query thing for 50 bucks if you can't figure it out, rofl.
|
Kyrgyz Republic1462 Posts
On March 26 2009 08:03 PokePill wrote: I'm an IS major and know SQL/PHP/etc pretty well and barely any C++/C#/etc. I assumed computer science majors are the exact opposite, so how can you expect them to work in a language that is the least related to their field? (I could be mistaken here)
If you know one mainstream programming language well enough, you already know 80% of what there is to know about all other languages. The basic concepts, algorithms, control structures are all the same regardless of what language you are using.
Especially if your main language is C/C++. Syntax of PHP/PERL/C++/C#/Java etc. is directly derived from C, and you don't need to delve into more advanced aspects of a given language if your task is so simple.
|
Have you actualy ever programmed or have you just dodged those parts? It is the only possible way I can think of, that would explain you having problems with something like that.
|
I have been studying computer science for 4 years, but I did all my programming classes in the first two, after that it was a mix between my graphics art minor and various hardware classes. That being said, I am a pretty good programmer in Java, Actionscript and C/C++ (though it's been a while with C too). But the one, ONE class I had on database driven websites was over two years ago and it was in ASP, and the professor was a useless fake who has since been kicked from the university, so the material wasn't exactly top notch. He gave us the ASP and told us to do the SQL, and that along with my database Access class is what made me know SQL but not ASP, and certainly not PHP.
As pokepill said, internet networking and database driven websites isn't exactly the main subject of my major. So no, I don't know how ASP and PHP work differently, excuse me so fucking much. I barely know how ASP works, as the one class I had two years ago was utter shit, really fucking sorry. I have never used PHPmyadmin or mysql, only the sql language itself, and like I said, I'm burned out. If I am given the basics, I usually learn by doing from there, but right now I can't take learning a new language. If I wasn't stressed out of my head trying to keep up with six other classes this semester I might've had more success, but no such luck.
Making database driven websites was not why I got into Computer Science, it was for programming applications, which is part of the reason I am so overjoyed at getting to do a database for my final project.
It is "too dull" for you, is it? Sorry, but you don't deserve to graduate if you are that useless. Thanks, go to hell. Obviously you've never had a subject you didn't give a shit about be a part of your core curriculum.
|
A large number of applications need to store data in some way, you can't really avoid databases.
|
You cannot NOT GIVE A SHIT ABOUT a subject in CS. You will die but not as horribly as those who do it in their engineering courses.
I don't believe you only used one language to mess with databases in your course. And besides you're suppose to use stuffs you're good at as much as possible in your senior project. Does it have to be in PHP? PHP is going to be a little more hassle because of validation and anti-hack checks. Giving you PHP codes is not gonna really help IMO. I'm still recommending to learn it yourself. You can't run! (Well, you can but you'll fail the subject)
|
Nothing against codeigniter, it's a great php framework but when your learning the basics of php/sql I think it's better to keep it as simple as possible to begin with
First up your bible : http://www.php.net/docs.php
This basic guestbook tutorial should teach you the basics of updating a db through a button/textbox. http://www.awtrey.com/tutorials/dbeweb/ (I haven't actually done this one since my course has a better one but it's only accessible at uni but remember it may not be suitable coding practise, always remember to not trust user input and use appropriate server/client-side validations.)
Some php tips/common use things : http://www.onlamp.com/pub/a/onlamp/2002/04/04/webdb.html
More php tutorials : http://www.onlamp.com/php/
gl hf
|
I know, I don't really have a problem with databases per se, storing and retrieving data is powerful tool and I'll most likely be using it in the future, but I had planned on freshening up on that among other things in the fall, before I got a job. And like I said, I know how to use SQL to work with databases in for example access, but I've never used it with PHP before so I don't even know where to start. I am right now plowing through w3schools again raging over how nothing works and I only just realized I have to name my php files .php. They were .html before and I was kinda curious (in a raging kind of way) as to why I didn't get so much as an error message. PHP syntax seem very close to C, but then I'm not really concerned about PHP as much as using it to be able to use SQL databases.
I've learned how to create a database and a table now, but I just lost my marbles and I need to lie down.
edit: thanks for the links
|
Don't spout off bullshit about being burned out, you will need to be learning new things constantly even after you graduate. It's really not that hard - just take it one step at a time, and I bet once you get going you'll be enjoying yourself.
I do feel your pain though. I built a C#/ASP back end that called some mySQL stored procedures during a summer internship, which was fine once as a learning experience, but I'd rather not do it again since I'm focused on theory / AI.
|
On March 26 2009 11:56 Osmoses wrote:+ Show Spoiler +I know, I don't really have a problem with databases per se, storing and retrieving data is powerful tool and I'll most likely be using it in the future, but I had planned on freshening up on that among other things in the fall, before I got a job. And like I said, I know how to use SQL to work with databases in for example access, but I've never used it with PHP before so I don't even know where to start. I am right now plowing through w3schools again raging over how nothing works and I only just realized I have to name my php files .php. They were .html before and I was kinda curious (in a raging kind of way) as to why I didn't get so much as an error message. PHP syntax seem very close to C, but then I'm not really concerned about PHP as much as using it to be able to use SQL databases.
I've learned how to create a database and a table now, but I just lost my marbles and I need to lie down.
php is very forgiving when it comes to syntax which is why some people hate it. Also make sure you give your php scripts appropriate file access permissions. Remember to keep your mysql connection details outside of public_html too.
|
Computer Sci majors don't need to know every domain / languages but he should have the ability to seek and find the information that he requires~!..
|
I've taken zero CS classes, bought zero books, and am completely self-taught. And now I've pretty much near-mastered PHP/MySQL. You say you have enough background knowledge to figure out the rest.. then why don't you spend the few minute it takes to at least use Google to find out how to do what you need first.
|
United States3824 Posts
Sorry that you are still getting tore about this since this morning man, though break
|
|
|
|