roopurt18 Posted December 1, 2006 Share Posted December 1, 2006 I'd like to query for the currently used database. Quote Link to comment https://forums.phpfreaks.com/topic/29172-query-for-current-database/ Share on other sites More sharing options...
noobstar Posted December 2, 2006 Share Posted December 2, 2006 Hmm you should be a little more specific but i will asume a few things and give you an example:<?phpmysql_connect("host", "username", "password");mysql_select_db("database");$query = mysql_query("select (fieldname) from (tablename)");echo $query;?>Hope this answers your question. Quote Link to comment https://forums.phpfreaks.com/topic/29172-query-for-current-database/#findComment-133832 Share on other sites More sharing options...
fenway Posted December 3, 2006 Share Posted December 3, 2006 You mean the name of the current database? Quote Link to comment https://forums.phpfreaks.com/topic/29172-query-for-current-database/#findComment-134502 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.