Hi..Wanna ask if someone knows how to retrieve records in database in PHP...I want that if i click the "retrieve button" all records will retrieve..I'll use retrieving when disaster occurs..tnx in advance.. :)
takeshi 0 Junior Poster in Training
Recommended Answers
Jump to Post?
Archives are usually used for disaster recovery!
That is such a genaral question, i don't think ther is an answer.
Jump to Postu dont need php script just to retrieve records... all you have to do is go to phpmyadmin and then export database and a sampledatabase.sql will be given to you. dont worry... its not a big file... it's just a plain text...
Jump to Posttry this:
<?php mysql_connect("localhost","dbusername","dbpass"); mysql_select_db("databasename"); $sql = mysql_query("SELECT * FROM `tablename`"); $results = mysql_fetch_array($sql); print_r($results); ?>
Is this what you want?
Jump to PostAbove code is fine. Try it please
All 13 Replies
landonmkelsey -1 Newbie Poster
JRM 107 Practically a Master Poster
harry_watson 0 Light Poster
vaultdweller123 32 Posting Pro
vaultdweller123 32 Posting Pro
landonmkelsey -1 Newbie Poster
takeshi 0 Junior Poster in Training
takeshi 0 Junior Poster in Training
kishan112 0 Light Poster
takeshi 0 Junior Poster in Training
harry_watson 0 Light Poster
BzzBee 5 Posting Whiz
harry_watson 0 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.