Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,388 members, 7,954,564 topics. Date: Friday, 20 September 2024 at 10:28 PM |
Nairaland Forum / Science/Technology / Webmasters / Teach Me Database And More. (1109 Views)
Help! How To Pull Data From Database And Display On A Webpage / I Need A Webhosting With Mssql Database And Glassfish Server / Database And National Planning (2) (3) (4)
Teach Me Database And More. by jmoore(m): 2:28pm On Jul 07, 2010 |
Hello, i am a beginner I am learning on my own so I will be glad if anyone can help me out on certain issues I am learning database now by myself with some info I get online below are the chapters * Part 1 - Introduction * Part 2 - Setting Up The Database * Part 3 - Inserting Information * Part 4 - Displaying Data * Part 5 - More Outputs * Part 6 - Single Records & Error Trapping * Part 7 - Updating & Deleting * Part 8 - Finishing The Script With myphpadmin I was able to set up my database I want to insert information but I need to learn how to connect to mySQL database below are the instructions I have seen but I do not know where to type them $username="your_username"; $password="your_password"; $database="your_database"; mysql_connect(localhost,$username,$password); mysql_close(); SO MY PROBLEM NOW IS WHERE I SHOULD TYPE THESE COMMAND |
Re: Teach Me Database And More. by jeshurun07: 3:45pm On Jul 08, 2010 |
hi, these are my obsns 1) it seems u are mixing things up, first u mentioned u are using phpmyadmin, next u are listing pure php strings. methinks you have to be more detailed. 2) if u are using any php editor (dreamweaver, phpedit) create a page call it anything then do the following $host = 'localhost'; ---- This is were your dbase host is. generally it is on ur localhost $username ='root' ---- this is the name of the person accessing the dbase, since you say u are new to this and u are using phpmyadmin, then the name would likely be 'root'. $password ='' ----- this is the password to the dbase, for the above reasons it shld be empty. $database = "yourdatabasename" ----- this is the name of the database you created with phpmyadmin then you can connect like this mysql_connect(localhost,$username,$password); although i prefer this $conn = mysqli_connect($host,$username,$password,$database) reason for this format is so that you can open the connection only when you need it. that protects your apps lastly, it is only when you want to end a connection that you call the command below mysql_close(); if you are using my format, call it this way: mysqli_close($conn); Hope that was helpful, if not mail me at lekanodukoya@yahoo.com |
Re: Teach Me Database And More. by Nobody: 11:42am On Jul 09, 2010 |
@Poster, What you need to learn is PHP or any other Programming language, like JSP along side a database, like SQL, Oracle, whatever! In your case, you have already written two technologies MySql and PHP, Thanks! |
Re: Teach Me Database And More. by jjjkkkooo: 3:16pm On Jul 09, 2010 |
Jmoore, i understand ur situation. U need to get a php editor, u can use notepad. But its better to get Macromedia Dreamweaver. The codes u typed are php codes which u need to type in an editor. If u are based in Abuja, i can help u on one-on-one. If not, just install a version of dreamweaver and mail me on niyioke2000@yahoo.com. I ll teach u step by step. |
Re: Teach Me Database And More. by tonyc2: 6:45pm On Jul 12, 2010 |
working with databse is like suger you would enjoy it contact me on tiheanachor@nicodep.com |
(1) (Reply)
Web Host Owners / Pls Help Me On Bulk Sms Website! / Website Designers Wanted!
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 14 |