Posted by : Rohit Motwani Tuesday 5 June 2012


Most of the time we usemysql_select_db() to select a mysqldatabase, the syntax is
mysql_select_db( db_name, connection );
The above syntax results a boolean value, i.e. either true (1) or false(0).
Alternatively, you can use MySQL command:
USE database_name
Let me show you how to use it with PHP. You can implement the above MySQL command as with other MySQL commands
For example,
$query = "USE database_name;";
mysql_query($query, $connection);
This will select the database named database_name.

the only place for your all tech queries.

Google Ads

Search This Blog

JUMP TO URL

Popular Post

Rohit Motwani. Powered by Blogger.

- Copyright © Techonomix -Rohit Motwani|Terms And Conditions|Privacy Policy