ziedinjsh Posted October 8, 2012 Report Share Posted October 8, 2012 Sveiki! Man tāds jautājums: Kā var uztaisīt ka mysql izvēlas pie kuras db slēgties. Piem viens man ir uz lokālo serveri un otrs man ir uz hostinga.. veicot kkādus papildinājumus pārakstās pāri config fails un atkal jāraksta manuāli Doma: <?php if(hosts){ $dbase = mysql_connect("localhost", "root", "1234567890") or die(mysql_error()); mysql_set_charset('utf8',$dbase); mysql_select_db("nosaukums_us_hosta") or die(mysql_error()); }else{ $dbase = mysql_connect("localhost", "root", "0987654321") or die(mysql_error()); mysql_set_charset('utf8',$dbase); mysql_select_db("nosaukums_majaas") or die(mysql_error()); } ?> Quote Link to comment Share on other sites More sharing options...
aaxc Posted October 8, 2012 Report Share Posted October 8, 2012 Šis temats nesen te tika diezgan plaši aprunāts. Izmanto search funkciju. Quote Link to comment 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.