Problems after executing querys

Results 1 to 6 of 6
  1. #1
    Account Upgraded | Title Enabled! Enough is offline
    MemberRank
    Oct 2012 Join Date
    301Posts

    Problems after executing querys

    Hello

    Some time ago, I created my webstore and it was working perfectly. But after that I performed some queries (Item Bank and DeleteClan ClanEmblem), after that I am getting several errors in my CP.

    For example, when I buy an item from the webstore I get the following error:

    Warning: odbc_exec () [function.odbc-exec]: SQL error: [Microsoft] [ODBC SQL Server Driver] [SQL Server] The conversion of a char data type to a datetime data type resulted in a datetime out of range., SQL state 22008 in SQLExecDirect in D:\AppServ\host\shop\set.php on line 202
    Item sent to Central Bank!

    Note: Line 202:
    PHP Code:
      $itemsres odbc_exec($con,"INSERT INTO AccountItem (AID, ItemID, RentDate, cnt) VALUES('".$slacc->AID."','$itemid','$date','1')"); 
    This consumes my Coins but the item does not go to the bank. Something similar also when I try to create a clan by CP.

    I believe that this occurred after the execution of any query I mentioned above, and do not know how to reverse it, and worse, I did not backup =[

    Can anyone help me?


  2. #2
    In Progress... FFXIV... Anju is offline
    MemberRank
    Oct 2010 Join Date
    Mist Ward 7 #38Location
    1,946Posts

    Re: Problems after executing querys

    Replace your '$date' with GETDATE().

  3. #3
    Account Upgraded | Title Enabled! Enough is offline
    MemberRank
    Oct 2012 Join Date
    301Posts

    Re: Problems after executing querys

    It did not work, i tested.

    I also noticed that I have a mistake in the registry as well, like this. Heck, I'm lost! I did not touch anything and got these errors...

  4. #4
    In Progress... FFXIV... Anju is offline
    MemberRank
    Oct 2010 Join Date
    Mist Ward 7 #38Location
    1,946Posts

    Re: Problems after executing querys

    It's most likely your variables aren't allowed in the query execute.
    I'm not really sure since I don't know the full code for this.

    You can try something like this:
    PHP Code:
    $aid $slacc->AID;
    odbc_exec($con,"INSERT INTO AccountItem (AID, ItemID, RentDate, Cnt) VALUES('$aid','$itemid',GETDATE(), 1)"); 
    If that doesn't work, mind posting the .php file?

  5. #5
    Account Upgraded | Title Enabled! Enough is offline
    MemberRank
    Oct 2012 Join Date
    301Posts

    Re: Problems after executing querys

    I tried exactly that, Anju.

    I am contacting you to show you better, check your MP.

  6. #6
    In Progress... FFXIV... Anju is offline
    MemberRank
    Oct 2010 Join Date
    Mist Ward 7 #38Location
    1,946Posts

    Re: Problems after executing querys

    Someone closed this. Helped him over Teamviewer.

    The problem was that his variable $date isn't the correct way to input the values. I told him to replace all '$date' to GETDATE().



Advertisement