Fix NULL to nullptr for SQL queries take 2

This commit is contained in:
Michael Cook 2013-05-07 18:20:09 -04:00
parent 0838d4507a
commit 059ecdb50b
3 changed files with 8 additions and 8 deletions

View File

@ -428,7 +428,7 @@ bool Database::ReserveName(uint32 account_id, char* name)
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT into character_ SET account_id=%i, name='%s', profile=nullptr", account_id, name), errbuf)) {
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT into character_ SET account_id=%i, name='%s', profile=NULL", account_id, name), errbuf)) {
cerr << "Error in ReserveName query '" << query << "' " << errbuf << endl;
safe_delete_array(query);
return false;
@ -1196,9 +1196,9 @@ bool Database::GetSafePoints(const char* short_name, uint32 version, float* safe
{
cerr << "Error in GetSafePoint query '" << query << "' " << errbuf << endl;
cerr << "If it errors, run the following querys:\n";
cerr << "ALTER TABLE `zone` CHANGE `minium_level` `min_level` TINYINT(3) UNSIGNED DEFAULT \"0\" NOT nullptr;\n";
cerr << "ALTER TABLE `zone` CHANGE `minium_status` `min_status` TINYINT(3) UNSIGNED DEFAULT \"0\" NOT nullptr;\n";
cerr << "ALTER TABLE `zone` ADD flag_needed VARCHAR(128) NOT nullptr DEFAULT '';\n";
cerr << "ALTER TABLE `zone` CHANGE `minium_level` `min_level` TINYINT(3) UNSIGNED DEFAULT \"0\" NOT NULL;\n";
cerr << "ALTER TABLE `zone` CHANGE `minium_status` `min_status` TINYINT(3) UNSIGNED DEFAULT \"0\" NOT NULL;\n";
cerr << "ALTER TABLE `zone` ADD flag_needed VARCHAR(128) NOT NULL DEFAULT '';\n";
safe_delete_array(query);
}

View File

@ -3784,12 +3784,12 @@ void Mob::InsertQuestGlobal(int charid, int npcid, int zoneid, const char *varna
char *query = 0;
char errbuf[MYSQL_ERRMSG_SIZE];
// Make duration string either "unix_timestamp(now()) + xxx" or "nullptr"
// Make duration string either "unix_timestamp(now()) + xxx" or "NULL"
stringstream duration_ss;
if (duration == INT_MAX)
{
duration_ss << "nullptr";
duration_ss << "NULL";
}
else
{

View File

@ -1241,11 +1241,11 @@ int QuestManager::InsertQuestGlobal(
char *query = 0;
char errbuf[MYSQL_ERRMSG_SIZE];
// Make duration string either "unix_timestamp(now()) + xxx" or "nullptr"
// Make duration string either "unix_timestamp(now()) + xxx" or "NULL"
stringstream duration_ss;
if (duration == INT_MAX)
{
duration_ss << "nullptr";
duration_ss << "NULL";
}
else
{