stelthius Posted March 3, 2009 Share Posted March 3, 2009 Hello everyone, im just wondering if there is a cleaner and more efficiant way for me to do this on linux, <?php $db_engine = 'mysql'; $db_object = mysql_pconnect($db_host, $db_user, $db_pass) or die(mysql_error()); $database_Customer_Database = $db_name; $Customer_Database = mysql_pconnect($db_host, $db_user, $db_pass) or die(mysql_error()); $colname_Config = "1"; mysql_select_db($database_Customer_Database, $Customer_Database); $query_Config = sprintf("SELECT * FROM config", $colname_Config); $Config = mysql_query($query_Config, $Customer_Database) or die(mysql_error()); $row_Config = mysql_fetch_assoc($Config); $totalRows_Config = mysql_num_rows($Config); $db_engine = 'mysql'; $db_object = mysql_pconnect($db_host, $db_user, $db_pass) or die(mysql_error()); $database_MySQL = "mysql"; $MySQL = mysql_pconnect($db_host, $db_user, $db_pass) or die(mysql_error()); if (isset($_SESSION['username'])) { mysql_select_db($database_Customer_Database, $Customer_Database); $query_User = sprintf("SELECT * FROM custumerbase WHERE servicename = '".$_SESSION['username']."'"); $User = mysql_query($query_User, $Customer_Database); $row_User = mysql_fetch_assoc($User); $totalRows_User = mysql_num_rows($User); } ?> Any and all input is welcome 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.