Welcome Guest, Not a member yet? Register   Sign In
prevent database update when no where statement found
#8

[eluser]a&w[/eluser]
What is your perception on why this would be bad to leave in place?

Using the config seemed plausible because the config already has an option to disable debugging.

So to that I'd just add:
Code:
$db['default']['hostname'] = $hostname;
$db['default']['username'] = $username;
$db['default']['password'] = $password;
$db['default']['database'] = $database;
$db['default']['dbdriver'] = "mysqli";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = $db_debug;
/* */
$db['default']['restrict_no_where'] = TRUE;
/* */
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

I currently have a production switch so it disables error checking, debugging, etc. when the files are not on the development site.

Code:
switch(IS_PRODUCTION) {
    case false:
        // Local (development) server
        $hostname  = 'localhost';
        $username  = 'root';
        $password  = '####';
        $db_debug  = 'msg';//true; //do report database errors (echos errors to page, can't catch via ajax)
        break;
    default:
        // Remote (production) server
        $hostname  = 'localhost';
        $username  = 'root';
        $password  = '####';
        $database = 'cc_issues';
        $db_debug  = false; //don't report database errors
        break;
}


Messages In This Thread
prevent database update when no where statement found - by El Forum - 01-09-2009, 01:19 PM
prevent database update when no where statement found - by El Forum - 01-09-2009, 01:32 PM
prevent database update when no where statement found - by El Forum - 01-09-2009, 01:33 PM
prevent database update when no where statement found - by El Forum - 01-09-2009, 01:41 PM
prevent database update when no where statement found - by El Forum - 01-09-2009, 01:55 PM
prevent database update when no where statement found - by El Forum - 01-09-2009, 02:10 PM
prevent database update when no where statement found - by El Forum - 01-09-2009, 02:23 PM
prevent database update when no where statement found - by El Forum - 01-09-2009, 02:37 PM
prevent database update when no where statement found - by El Forum - 01-09-2009, 02:42 PM
prevent database update when no where statement found - by El Forum - 01-09-2009, 03:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB