Jump to content

Doubt in sql please solve my problem


Net123

Recommended Posts

Hi i have start's learning sql from w3schools now i have question in that ?I have 4 thing's in my hand 1)database name2)database user3)database password4)host(localhost)but here three thing's only found how can i solve this ?mysql_connect("your.hostaddress.com", "username","password")

Link to comment
Share on other sites

Hi i have start's learning sql from w3schools now i have question in that ?I have 4 thing's in my hand 1)database name2)database user3)database password4)host(localhost)but here three thing's only found how can i solve this ?mysql_connect("your.hostaddress.com", "username","password")
$con = mysql_connect("localhost","dbusername","dbpass");if (!$con)  {  die('Could not connect: ' . mysql_error());  }mysql_select_db("dbname", $con);

Link to comment
Share on other sites

You select the database using mysql_select_db(). One database server may hold many databases.As for user settings, sure, but you'll still need some way to identify them.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...