Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how we can use a database with php.

Answers were Sorted based on User's Feedback



how we can use a database with php...

Answer / narayana

no idea because its a seperate software

Is This Answer Correct ?    1 Yes 1 No

how we can use a database with php...

Answer / shrikant

mysql> CREATE DATABASE first_test;
Query OK, 1 row affected (0.31 sec)
mysql> USE first_test;
Database changed
mysql> CREATE TABLE people (
id int UNIQUE NOT NULL,
first_name varchar(40),
surname varchar(50),
PRIMARY KEY(id)
);
Query OK, 0 rows affected (0.24 sec)
mysql> INSERT INTO people VALUES(1,'Ann','Brache');
Query OK, 1 row affected (0.09 sec)
mysql> INSERT INTO people VALUES(2,'Narcizo','Levy');
Query OK, 1 row affected (0.02 sec)
mysql> INSERT INTO people VALUES(3,'Tony','Crocker');
Query OK, 1 row affected (0.00 sec)

Your table should now look as follows:

mysql> SELECT * FROM people;
+----+------------+---------+
| id | first_name | surname |
+----+------------+---------+
| 1 | Ann | Brache |
| 2 | Narcizo | Levy |
| 3 | Tony | Crocker |
+----+------------+---------+
and for connecting

<?php
$username = "username";
$password = "password";
$hostname = "localhost";
$dbh = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

Explain about Normalization?

0 Answers   Infosys,


What are the components of dbms?

0 Answers  


what are the main differences between ms access and sqlserver

1 Answers   C DAC, CDAC,


Write the Syntax for Cursors.

2 Answers   CarrizalSoft Technologies, HP,


What is the maximum size per database for sql server express?

0 Answers  


What are the Advantages of using CTE in sql server?

0 Answers   Winsol Solutions,


what is the difference in login security modes between v6.5 and 7.0? : Sql server database administration

0 Answers  


How to find the date and time of last updated table?

3 Answers  


Define cursor locking

0 Answers  


What is transaction server implicit?

0 Answers  


What is ms sql server triggers?

0 Answers  


What is difference between temp table and cte?

0 Answers  


Categories