|
You last visited: Today at 20:02
Advertisement
mysql "Set"
Discussion on mysql "Set" within the CO2 Private Server forum part of the Conquer Online 2 category.
08/21/2013, 01:48
|
#1
|
elite*gold: 0
Join Date: Jun 2013
Posts: 18
Received Thanks: 0
|
mysql "Set"
Str8 into the point ... some columns or tables in my database doesn't obey the Set command
ex:
when you create a character, the EntityID of account is supposed to be set as the EntityID
but that doesn't happen it remains 0
so u have to create a new character every time u login ... despite the entity is created is already
it just doesn't link to the account because the EntityID didn't set
the question is ... why doesn't it set?
|
|
|
08/21/2013, 02:58
|
#2
|
elite*gold: 0
Join Date: Feb 2006
Posts: 726
Received Thanks: 271
|
Without your code there isnt really a way to know for sure.
Although I think you are referring to Insert?
|
|
|
08/21/2013, 03:52
|
#3
|
elite*gold: 0
Join Date: Jun 2013
Posts: 18
Received Thanks: 0
|
okay i will get an example:
on Character creation :
PHP Code:
client.account.EntityID = client.Entity.EntityID;
account.save();
later on accounttable.cs
PHP Code:
public void Save()
{
if (exists)
{
MySqlCommand cmd = new MySqlCommand(MySqlCommandType.UPDATE);
cmd.Update("accounts").Set("Password", Password).Set("IP", IP).Set("EntityID", EntityID).Set("LastCheck", (ulong)DateTime.Now.ToBinary()).Where("Username", Username).Set("festivalclaim",festival).Execute();
}
else
{
try
{
MySqlCommand cmd = new MySqlCommand(MySqlCommandType.INSERT);
cmd.Insert("accounts").Insert("Username", Username).Insert("Password", Password).Insert("State", (byte)State).Execute();
}
catch (Exception e) { Program.SaveException(e); }
}
|
|
|
08/21/2013, 04:18
|
#4
|
elite*gold: 0
Join Date: Feb 2006
Posts: 726
Received Thanks: 271
|
Is anything being changed at all?
Try changing:
Code:
cmd.Update("accounts").Set("Password", Password).Set("IP", IP).Set("EntityID", EntityID).Set("LastCheck", (ulong)DateTime.Now.ToBinary()).Where("Username", Username).Set("festivalclaim",festival).Execute();
to
Code:
cmd.Update("accounts").Set("Password", Password).Set("IP", IP).Set("EntityID", EntityID).Set("LastCheck", (ulong)DateTime.Now.ToBinary()).Set("festivalclaim",festival).Where("Username", Username).Execute();
|
|
|
08/21/2013, 06:15
|
#5
|
elite*gold: 0
Join Date: Jun 2013
Posts: 18
Received Thanks: 0
|
Quote:
Originally Posted by Aceking
Is anything being changed at all?
Try changing:
Code:
cmd.Update("accounts").Set("Password", Password).Set("IP", IP).Set("EntityID", EntityID).Set("LastCheck", (ulong)DateTime.Now.ToBinary()).Where("Username", Username).Set("festivalclaim",festival).Execute();
to
Code:
cmd.Update("accounts").Set("Password", Password).Set("IP", IP).Set("EntityID", EntityID).Set("LastCheck", (ulong)DateTime.Now.ToBinary()).Set("festivalclaim",festival).Where("Username", Username).Execute();
|
OMG o.O
I thought i removed that long time ago!!
ThnQ you are a savior .... It got to be the error of course
ThnQ again and *** mercy my memory -_-
|
|
|
All times are GMT +1. The time now is 20:03.
|
|