answersLogoWhite

0


Top Answer
User Avatar
Wiki User
Answered 2009-04-07 01:32:51

The easiest way to get started is to install XAMPP. It comes with MySQL, PHP, Apache, phpMyAdmin (for database management,) and various other tools. To connect from PHP to MySQL database, you use this:

$DBconnect = mysql_connect ("localhost","username","password");

mysql_select_db("yourDatabaseName", $DBconnect);

?> That will just connect you ready to use the database, create your tables in phpMyAdmin, it's easier. When you are ready to start adding/viewing data, you could use the following to add data:

$sql = "INSERT INTO myTable VALUES('value1', 'value2')";

mysql_query($sql);

?> Then the following to view data:

$sql = "SELECT * FROM myTable";

$queryResult = mysql_query($sql);

if (mysql_num_rows($queryResult) == 0){

echo "Table Empty";

} else {

while ($dbRecord=mysql_fetch_array($queryResult)){

$value1 = $dbRecord['field1'];

$value2 = $dbRecord['field2'];

echo $value1.', '.$value2.'

';

}

}

}

?>

This is a solution and works fine, but if your looking to install it all on your own/manualy. You have to install MYSQL php module.

Here is a very nice TUT that will help you if you chose to do so manually: http://www.php-mysql-tutorial.com/install-apache-php-mysql.php Every server I've setup I do it manually. Its just the way I am, I like having control over the whole process.

001
๐Ÿ™
0
๐Ÿคจ
0
๐Ÿ˜ฎ
0
๐Ÿ˜‚
0
User Avatar

Your Answer

Loading...

Still have questions?

Related Questions

How does apache mysql and php work together reply?

Apache, MySQL, and PHP work together as a stack. Apache as the HTTP server, MySQL as the database, and PHP for scripting.


What do I need to do to make PHP and MySQL work together?

Both are Open-source and free. The combination of PHP and MySQL gives unmet options to create just about any kind of website - from small contact form to large corporate portal.


How do you retrieve 10 records from table in mysql?

For work with mysql database make use of software below to open/read/scan/export-import mysql data


How do groups of organs assemble and work together to make an organism?

i need a answer


Working together in work?

we need to work together


How do mitochondria and chloroplasts work together?

they work together to make energy for the cellMitochoindria need glucose for energy production. This glucose is produced by chloroplasts


How do you make relationships work?

communication and trust. you need to work together and dicuss everything that goes oin in you life!


Why do we need to work together to reduce ocean pollution?

we need to work together because one person cannot do it all alone! We are a country and we need to work together if more people come together we can stop the pollution!


Do tissues work together with other structures to perform a function?

No. Tissues work together to make organs. Organs work together to make the organ system


Tissues that work together make what?

Tissues that work together make an organ. Organs that work together make an organ system - also known as an Organism. Organ systems that work together are the Respiratory system, the Nervous system, the Circulatory system. and what not.


Would MySQL commands work in a terminal like application Mac OS X if you didn't have an active web server installed like Apache would you be able to create databases without a web server?

MySQL and Apache are two totally different things, you only see them together a lot because a lot of Web apps use MySQL to store info in the database. So yes, you can use mySQL without Apache.


How can MYSQL hosting benefit someone?

MYSQL hosting can benefit someone by reducing the workload for online website work and help with managing online databases and it will help balance work between itself and others.


What is a good server for PHP language?

The best server yet for php serving is Apache, as PHP and Apache work closely together. The MySQL community database is a good server for PHP applications, this is why we talk about w/xamp servers, Windows/Linux Apache MySQL PHP servers.


Why is it important that the president and Congress work together?

It is important that the President and Congress work together because without them working together they cant make good decisions, because what they both do involves each other, and they have to work together to make a good decision. The president has to work with Congress, like Congress has to work with the president. It is important that the President and Congress work together because without them working together they cant make good decisions, because what they both do involves each other, and they have to work together to make a good decision. The president has to work with Congress, like Congress has to work with the president.


How do bones work together?

bones need to work together or they will do something so that you can't do anything again.


Why must muscles work together?

Muscles must work together because you need to move your body.


How do you get MySQL to work with PHP 5.3.2?

Please see the related link below.


Pilgrims agreed to work together to make their colony succeed in the?

Pilgrims agreed to work together to make their colony succeed in the Mayflower Compact


Which two body systems work together to make movement possible?

The muscular and skeletal systems work together to make movement possible


How do you connect to an Access database using MySQL?

Have you tried out Navicat? Although I am not sure if it fulfills all your needs, it's my favorite MySql admin tool when I have to work on a windows machine.


How do you make a netball team work out and work together?

what makes a netball


How do cells work?

cells work together to make the body functional


What types of insects work together for a need?

ants


What are ways that the abuser and abusee can make the relationship work after confronting the abuse?

If the abuse continues - you cannot make the relationship work. You both need to get counseling, separate and together. If the abuse doesn't stop, you need to get out of the relationship. It will probably be a long hard "journey", but if you are both willing to work on it, you will make it through. "What are ways that the abuser and abusee can make the relationship work after confronting the abuse?" Open & Honest discussion.


How do whales save themselves?

The truth.....they can't. We ALL need to work together to make a better environment for the whales. GO WHALES!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!