waynew Posted July 11, 2008 Share Posted July 11, 2008 Use: mysql_query("use dbname"); ???? Link to comment https://forums.phpfreaks.com/topic/114288-solved-should-you-not/ Share on other sites More sharing options...
DarkWater Posted July 11, 2008 Share Posted July 11, 2008 You could...or you could use mysql_select_db(). o-O Link to comment https://forums.phpfreaks.com/topic/114288-solved-should-you-not/#findComment-587696 Share on other sites More sharing options...
waynew Posted July 11, 2008 Author Share Posted July 11, 2008 Oh I know that but I read somewhere that it mighten't be a good idea to use that anymore. Link to comment https://forums.phpfreaks.com/topic/114288-solved-should-you-not/#findComment-587703 Share on other sites More sharing options...
DarkWater Posted July 11, 2008 Share Posted July 11, 2008 No difference. Link to comment https://forums.phpfreaks.com/topic/114288-solved-should-you-not/#findComment-587705 Share on other sites More sharing options...
waynew Posted July 11, 2008 Author Share Posted July 11, 2008 PHP reckons that if you're using multiple connections you should use mysql_query("use databasename"); So I suppose I was panicking over nothing. Link to comment https://forums.phpfreaks.com/topic/114288-solved-should-you-not/#findComment-587711 Share on other sites More sharing options...
DarkWater Posted July 11, 2008 Share Posted July 11, 2008 You can do it whichever way you prefer. Link to comment https://forums.phpfreaks.com/topic/114288-solved-should-you-not/#findComment-587717 Share on other sites More sharing options...
discomatt Posted July 11, 2008 Share Posted July 11, 2008 <?php $link1 = mysql_connect( 'server1', 'root', 'pass' ); $link2 = mysql_connect( 'server2', 'root', 'pass' ); mysql_select_db( 'db1', $link1 ); mysql_select_db( 'db2', $link2 ); ?> Link to comment https://forums.phpfreaks.com/topic/114288-solved-should-you-not/#findComment-587774 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.