- This topic is empty.
-
AuthorPosts
-
April 3, 2010 at 12:44 pm #28606
MichaelR
MemberHi, I was wondering if anyone knew where to get help on PHP and MySQL for literally basic beginners.
I am very advanced at CSS, HTML and XHTML, and I know very basic PHP like variables etc. :)
I would need the help to be very explanatory like what databases are about and how to use them.
I know about NetTuts and Smashing and things Like CSS-Tricks however none of these have was I need. :?
Thanks, Michael :D
April 3, 2010 at 2:26 pm #73393MichaelR
Member"TT_Mark" wrote:Hi Michael,Personally I learned from experimenting, basically just coming up with ideas and then working out how to code them in PHP using the PHP.net website.
I never actually read a book and found trial and error the best way to learn
Hi I would do this however I literally know nothing about MySQL, there is one big question you’ll laugh because you’ll find it stupid however I’m not sure how it works.
You know if you were making your own CMS and and you make tables in Mysql and then to connect to the database you use like a config.php page how come every one who uses your script doesn’t have to create tables how do they automatically appear :S
Thanks, Michael
April 3, 2010 at 4:51 pm #73401Irrorate
MemberSQL: http://net.tutsplus.com/tutorials/datab … beginners/
To answer your question, the tables inside the database are created on the server and the PHP script accesses the tables and does what is required (retrieve/insert/alter contents).
The tables are there on the server once, but the PHP shows it to everyone who views.
April 4, 2010 at 12:44 am #73418blue642
MemberI believe what you may be trying to ask is how to create tables in MySQL with PHP… So that if someone "installed" your code, they wouldn’t have to build the tables themselves… (like with WordPress, or other CMS’s, you just create a DB, and it works, creating it’s own tables… (Forgive me if I misunderstood.)
Firstly, I have been reading the following 2 books, which I would recommend…
http://www.sitepoint.com/books/phpant2/
http://www.sitepoint.com/books/phpmysql4/(Chris & Mods, forgive me if I shouldn’t link to a store…)
anyhow, they are both great resources to get you going…
As far as a specific code sample something like this would work…
Code:which came from another good resource (free…)
April 4, 2010 at 8:11 am #73424MichaelR
Member@Irrorate DO you have to install WAMP if you have PHP and MySQL on your website/server online? Can you not just upload nyfiles to the website?
Thanks Michael
April 4, 2010 at 8:42 am #73419Rob MacKay
Participantyou really should have read the sticky :P
April 4, 2010 at 9:41 am #73427matt25
ParticipantThe ones in the Sticky are awesome, if you want a more extensible course then check out http://www.lynda.com
MattApril 4, 2010 at 10:20 am #73428Irrorate
Member"MichaelR" wrote:@Irrorate DO you have to install WAMP if you have PHP and MySQL on your website/server online? Can you not just upload nyfiles to the website?Thanks Michael
You only need to install a local server (WAMP/MAMP/XAMPP) if you want to run a server on your local PC (i.e.via your own localhost). If you own webhosting it should come pre-installed with PHP and MySQL (I know most/all Apache servers do).
If your website is online (i.e. has webhosting) it should already allow PHP and MySQL (if you’re not sure – open a support ticket)
April 4, 2010 at 2:47 pm #73448MichaelR
MemberNo, It does have PHP 5 and MySQL and PHPMyAdmin i’m asking do I have to install something like WAMP if I have an online website with these features.
Also im having trouble with the following code from w3schools
Code:I fill in the top line with the info when I created a mysql user but then leave the rest, it says cannot create database or something, do i have to change my_db or should it work like that. I know I will change it when I add more or with other projects but it should work, right?
Thanks, Michael
April 4, 2010 at 5:05 pm #73455Irrorate
Member"MichaelR" wrote:No, It does have PHP 5 and MySQL and PHPMyAdmin i’m asking do I have to install something like WAMP if I have an online website with these features.Also im having trouble with the following code from w3schools
Code:I fill in the top line with the info when I created a mysql user but then leave the rest, it says cannot create database or something, do i have to change my_db or should it work like that. I know I will change it when I add more or with other projects but it should work, right?
Thanks, Michael
No, WAMP isn’t necessary if you already have these features on an online webserver. WAMP is like a webserver, but you run it locally not on your actual website.
Are your connection details right? (remember that every webserver is localhost to itself)
If yes, maybe your PHP settings are stopping the script from creating a database (generally a lot are disabled for security reasons)
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.