how we can use a database with php.
Answers were Sorted based on User's Feedback
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 |
Explain ranking functions?
can you any body tell me while running BCP Out in instance in sql server 2000 is getting error. Error = [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.?
you added a row to a view, but the row is not shown on the view. Explain how this can happen, and how you can remedy the situation
What is a DBMS, query, SQL?
Name three of the features managed by the surface area configuration tool? : sql server security
Define Foreign Key?
3 Answers ADP, College School Exams Tests,
i need some interview questions on sql server developer plz any onee send some links.
How do I make a resultset scrollable?
How can you check the version of sql server?
How would we use distinct statement? What is its use?
Define clusters?
1.How to check the backup file details if we do not have access to that folder 2.how to check the backup file size without connecting to the folder
3 Answers CarrizalSoft Technologies, IBM,