roopurt18 Posted December 1, 2006 Share Posted December 1, 2006 I'd like to query for the currently used database. 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. 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? Link to comment https://forums.phpfreaks.com/topic/29172-query-for-current-database/#findComment-134502 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.