This is a discussion on [Newbie] Simple, bare-bones PHP/MySQL database examples? within the PHP Language forums, part of the PHP Programming Forums category; (Let me first say that I'm a non-programmer/newbie asking for something very basic here, so every pro ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
(Let me first say that I'm a non-programmer/newbie asking for something
very basic here, so every pro is welcome to roll his eyes in disgust ....) I'd finally like to move all my data (PIM, CD archive etc.) from trusty old FileMaker to a Apache/MySQL/PHP based solution. I have no experience with any of these, though, and I would be grateful for a simple, bare-bones set of files (samples and maybe a tutorial) to start with - something I can learn from to avoid the frustration of making every dumb beginner's mistake. I have access to webspace with MySQL, PHP and phpMyAdmin, so what I need from there is a set of (preferably commented) .php files to: 1) Generate the actual tables in the DB and their fields - or should this normally be done using phpMyAdmin? 2) A sample input page to connect to a table in the database and add/list/edit/delete entries. 3) A sample output page that shows how to query a table, generate a sortable list of entries ("All CDs with artists whose name start with A, twenty entries per page") and from there go to ... 4) A sample "details" output page showing a single entry. There are three other topics where I am not sure how these are normally achieved: a) Permissions: I want to be able to restrict access to listing/adding/editing/deleting database entries. How is this normally done? Do I need a "users" table in my DB? How would I use this? b) Import/export data to/from .csv files. c) Transforming data on input/output: Both when submitting and reading data (i.e., building HTML pages from it), I'd like to run data through some Regular Expressions or some kind of "translation table" that will e.g. turn special characters in HTML entities. How would I do this? I know all the above must be pretty trivial/basic to anyone with PHP knowledge, but as a kind of low-tech guy :) guy, I find it hard to grasp these things, at least when starting from zero. So a kind of "starter package" would be highly appreciated. I would also appreciate some reading tips, but 800 page PHP/MySQL bibles won't help - I simply cannot learn the whole technology from scratch when I just have one particular application. Thank you. |
|
|||
|
wintermute_101_nospam@yahoo.de wrote:
> So a kind of > "starter package" would be highly appreciated. Start here: <?php echo 'Hello, World!'; ?> -- Mail to my "From:" address is readable by all at http://www.dodgeit.com/ == ** ## !! ------------------------------------------------ !! ## ** == TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address>) may bypass my spam filter. If it does, I may reply from another address! |
|
|||
|
wintermute_101_nospam@yahoo.de wrote:
(long laundry list of requests) > I know all the above must be pretty trivial/basic to anyone with PHP > knowledge, but as a kind of low-tech guy :) guy, I find it hard to > grasp these things, at least when starting from zero. So a kind of > "starter package" would be highly appreciated. > > I would also appreciate some reading tips, but 800 page PHP/MySQL > bibles won't help - I simply cannot learn the whole technology from > scratch when I just have one particular application. This is like the guy who graduates college on Friday with a BA in English Lit. and who walks into the local hospital on Monday, goes to the front desk and tells the clerk "I'd like a job doing neurosurgery on people with brain cancer. Can you give me tips, pointers, and maybe a book to read on how to do that?" Do yourself a favor and hire a "pro" to get this done for you. In the long run it will be less expensive and you'll get a much better result in far less time. Al C. __________________________________________________ ________ Adams-Blake Company, Inc. *** JAYA123 - the web-based total-office system for the small biz. Order entry, billing, bookkeeping, etc. for $14.95 a month. Perfect for the small business or start-up. See demo at: http://www.jaya123.com *** |
|
|||
|
wintermute_101_nospam@yahoo.de wrote:
> I'd finally like to move all my data (PIM, CD archive etc.) from trusty > old FileMaker to a Apache/MySQL/PHP based solution. I have no > experience with any of these, though, and I would be grateful for a > simple, bare-bones set of files (samples and maybe a tutorial) to start > with - something I can learn from to avoid the frustration of making > every dumb beginner's mistake. Hello, Try out this site. http://www.w3schools.com/php/default.asp specifically, http://www.w3schools.com/php/default.asp Excellent tutorials with plenty of info on a lot of different web-service technologies. HTH |
|
|||
|
go to codewakers.com and in the tutorials/basics section you will see a
tutorial named "Creating Dynamic Websites with PHP and MySQL". The tutorial covers from the installation of MySQL and PHP (so feel free to skip that) to creating tables and inserting, retreiving, modifiying and deleting data in the tables. It shows you some of the basic HTML and forms as well. I always recommend this tutorial to people who are just starting out. As for the rest of your requirements - look at the other tutorials. You will find that most of what you want is covered also. Your application can be a great learning experience or a huge headache. If you don't want to take the time and learn and code it yourself there are plenty of sites that will help you find a freelance coder to do it for you. But remember - Nothing is free and you get what you pay for. |
|
|||
|
Al. C wrote:
> wintermute_101_nospam@yahoo.de wrote: > > (long laundry list of requests) > > >>I know all the above must be pretty trivial/basic to anyone with PHP >>knowledge, but as a kind of low-tech guy :) guy, I find it hard to >>grasp these things, at least when starting from zero. So a kind of >>"starter package" would be highly appreciated. >> >>I would also appreciate some reading tips, but 800 page PHP/MySQL >>bibles won't help - I simply cannot learn the whole technology from >>scratch when I just have one particular application. > > > This is like the guy who graduates college on Friday with a BA in English Lit. > and who walks into the local hospital on Monday, goes to the front desk and > tells the clerk "I'd like a job doing neurosurgery on people with brain > cancer. Can you give me tips, pointers, and maybe a book to read on how to do > that?" > > Do yourself a favor and hire a "pro" to get this done for you. In the long run > it will be less expensive and you'll get a much better result in far less > time. > > Al C. > __________________________________________________ ________ > Adams-Blake Company, Inc. > *** > JAYA123 - the web-based total-office system for the > small biz. Order entry, billing, bookkeeping, etc. for $14.95 > a month. Perfect for the small business or start-up. > See demo at: http://www.jaya123.com > *** > > ....and you were never a newbie? I don't see any problem with this - got a problem that needs solving, chosen the tools, now want to know how to use them. No timeframe specified, just a private learning curve. Just because you see fit to advertise your products in your .sig makes you a god? Grow up. Steve |
|
|||
|
Great step-by-step tutorial, and they even have a nice PDF version
(http://codewalkers.com/tutorialpdfs/tutorial9.pdf). Thank you. I will try to start from there and maybe ask a pro should my head explode. |
|
|||
|
> This is like the guy who graduates college on Friday with a BA in
> English Lit. and who walks into the local hospital on Monday, goes > to the front desk and tells the clerk "I'd like a job doing > neurosurgery on people with brain cancer. No, it's not. It's more like the tourist guy who is asking for the map to a new city and a few recommendations from the locals. I'm not out to become Mr. Top Neurosurgeon/PHP whiz (never will be, don't need to), I just asked for a kind of template that I can try to understand and modify. > Do yourself a favor and hire a "pro" to get this done for you. I regularly hire pros in their respective area when working for my own clients. Everything else would be irresponsible, especially when spending other people's money. In this case, however, I am working without a budget, and I want to learn something, too; but not start from Point Zero. BTW, I think that professionalism is also characterized by a sense for self marketing. I may actually hire someone for this once I have the budget and/or cannot finish this on my own, but my money surely won't go to the snob who told me to get lost in the first place. |
|
|||
|
> Start here:
> <?php > echo 'Hello, World!'; > ?> Gee, thanks a *lot* for this helpful answer. I hope that when you need some advice in my area of expertise, you will find people as helpful and friendly as yourself. This is an attitude I find even worse than plain arrogance. Programmers claim (and rightly so) that programming is more an art than a technical task. But admitting I don't have the talent to start from scratch and asking for some headstart isn't humble enough, either - it's "Go the hard way or stay away." |
|
|||
|
> http://www.w3schools.com/php/default.asp
> Excellent tutorials with plenty of info on a lot of different web-service technologies. Great tutorials in fact, but I found the sheer amount of "low level" information a bit overwhelming. In the meantime, I have found phpMyEdit, which seems like a great starting place. It seems to do a lot out of the box, and I will try to move on from there. |