[MYSQL](Hardcoding). Its not saving any rows.
#9

Quote:
Originally Posted by EiresJason
Посмотреть сообщение
Can you print the final formatted query please and let us know what the result is?

pawn Код:
stock g_mysql_SaveMOTD()
{
    new query[1024];

    format(query, sizeof(query), "UPDATE `misc` SET ");

    format(query, sizeof(query), "%s `gMOTD` = '%s',", query, g_mysql_ReturnEscaped(GlobalMOTD, MainPipeline));
    format(query, sizeof(query), "%s `aMOTD` = '%s',", query, g_mysql_ReturnEscaped(AdminMOTD, MainPipeline));
    format(query, sizeof(query), "%s `vMOTD` = '%s',", query, g_mysql_ReturnEscaped(VIPMOTD, MainPipeline));
    format(query, sizeof(query), "%s `cMOTD` = '%s',", query, g_mysql_ReturnEscaped(CAMOTD, MainPipeline));
    format(query, sizeof(query), "%s `pMOTD` = '%s',", query, g_mysql_ReturnEscaped(pMOTD, MainPipeline));
    format(query, sizeof(query), "%s `ShopTechPay` = '%.2f',", query, ShopTechPay);
    format(query, sizeof(query), "%s `GiftCode` = '%s',", query, g_mysql_ReturnEscaped(GiftCode, MainPipeline));
    format(query, sizeof(query), "%s `GiftCodeBypass` = '%d',", query, GiftCodeBypass);
    format(query, sizeof(query), "%s `TotalCitizens` = '%d',", query, TotalCitizens);
    format(query, sizeof(query), "%s `TRCitizens` = '%d',", query, TRCitizens);
    format(query, sizeof(query), "%s `ShopClosed` = '%d',", query, ShopClosed);
    format(query, sizeof(query), "%s `RimMod` = '%d',", query, RimMod);
    format(query, sizeof(query), "%s `CarVoucher` = '%d',", query, CarVoucher);
    format(query, sizeof(query), "%s `PVIPVoucher` = '%d',", query, PVIPVoucher);
    format(query, sizeof(query), "%s `GarageVW` = '%d',", query, GarageVW);
    format(query, sizeof(query), "%s `PumpkinStock` = '%d',", query, PumpkinStock);
    format(query, sizeof(query), "%s `HalloweenShop` = '%d'", query, HalloweenShop);
     
        printf("Query: [%s]", query); //copy and paste the result inside the square brackets.
    mysql_function_query(MainPipeline, query, false, "OnQueryFinish", "i", SENDDATA_THREAD);
}
Here is it, As you can its updating but the misc table inside phmyadmin is still empty.

Код:
[10:09:24] [zcmd] [Ivann Setland]: /motd Test
[10:09:24] Query: [UPDATE `misc` SET  `gMOTD` = 'Test', `aMOTD` = '', `vMOTD` = '', `cMOTD` = '', `pMOTD` = '', `ShopTechPay` = '0.00', `GiftCode` = '', `GiftCodeBypass` = '0', `TotalCitizens` = '0', `TRCitizens` = '0', `ShopClosed` = '0', `RimMod` = '0', `CarVoucher` = '0', `PVIPVoucher` = '0', `GarageVW` = '0', `PumpkinStock` = '0', `HalloweenShop` = '0']
[10:09:27] [zcmd] [Ivann Setland]: /amotd test
[10:09:27] Query: [UPDATE `misc` SET  `gMOTD` = 'Test', `aMOTD` = 'test', `vMOTD` = '', `cMOTD` = '', `pMOTD` = '', `ShopTechPay` = '0.00', `GiftCode` = '', `GiftCodeBypass` = '0', `TotalCitizens` = '0', `TRCitizens` = '0', `ShopClosed` = '0', `RimMod` = '0', `CarVoucher` = '0', `PVIPVoucher` = '0', `GarageVW` = '0', `PumpkinStock` = '0', `HalloweenShop` = '0']
[10:09:31] [zcmd] [Ivann Setland]: /cmotd test
[10:09:31] Query: [UPDATE `misc` SET  `gMOTD` = 'Test', `aMOTD` = 'test', `vMOTD` = '', `cMOTD` = 'test', `pMOTD` = '', `ShopTechPay` = '0.00', `GiftCode` = '', `GiftCodeBypass` = '0', `TotalCitizens` = '0', `TRCitizens` = '0', `ShopClosed` = '0', `RimMod` = '0', `CarVoucher` = '0', `PVIPVoucher` = '0', `GarageVW` = '0', `PumpkinStock` = '0', `HalloweenShop` = '0']
[10:09:35] [zcmd] [Ivann Setland]: /vipmotd test
[10:09:35] Query: [UPDATE `misc` SET  `gMOTD` = 'Test', `aMOTD` = 'test', `vMOTD` = 'test', `cMOTD` = 'test', `pMOTD` = '', `ShopTechPay` = '0.00', `GiftCode` = '', `GiftCodeBypass` = '0', `TotalCitizens` = '0', `TRCitizens` = '0', `ShopClosed` = '0', `RimMod` = '0', `CarVoucher` = '0', `PVIPVoucher` = '0', `GarageVW` = '0', `PumpkinStock` = '0', `HalloweenShop` = '0']
Reply


Messages In This Thread
[MYSQL](Hardcoding). Its not saving any fields. ((Secondnary Problem comes)) Massively Confused! - by PURG3D - 09.04.2015, 11:19
Re: [MYSQL](Hardcoding). Its not saving any rows. - by PURG3D - 09.04.2015, 11:23
Re: [MYSQL](Hardcoding). Its not saving any rows. - by Sithis - 09.04.2015, 11:55
Re: [MYSQL](Hardcoding). Its not saving any rows. - by PURG3D - 09.04.2015, 13:39
Re: [MYSQL](Hardcoding). Its not saving any rows. - by Sithis - 09.04.2015, 14:32
Re: [MYSQL](Hardcoding). Its not saving any rows. - by PURG3D - 10.04.2015, 01:35
Re: [MYSQL](Hardcoding). Its not saving any rows. - by Antoniohl - 10.04.2015, 01:47
Re: [MYSQL](Hardcoding). Its not saving any rows. - by EiresJason - 10.04.2015, 05:07
Re: [MYSQL](Hardcoding). Its not saving any rows. - by PURG3D - 14.04.2015, 02:23
Re: [MYSQL](Hardcoding). Its not saving any rows. - by EiresJason - 14.04.2015, 03:49
Re: [MYSQL](Hardcoding). Its not saving any rows. - by PURG3D - 14.04.2015, 13:38
Re: [MYSQL](Hardcoding). Its not saving any rows. - by EiresJason - 14.04.2015, 14:16
Re: [MYSQL](Hardcoding). Its not saving any rows. - by PURG3D - 14.04.2015, 14:26
Re: [MYSQL](Hardcoding). Its not saving any rows. - by EiresJason - 14.04.2015, 14:34
Re: [MYSQL](Hardcoding). Its not saving any rows. - by PowerPC603 - 14.04.2015, 16:32
Re: [MYSQL](Hardcoding). Its not saving any rows. - by PURG3D - 14.04.2015, 23:08
Re: [MYSQL](Hardcoding). Its not saving any rows. - by PURG3D - 15.04.2015, 01:15
Re: [MYSQL](Hardcoding). Its not saving any rows. - by PURG3D - 15.04.2015, 07:09
Re: [MYSQL](Hardcoding). Its not saving any rows. - by PURG3D - 15.04.2015, 12:17
Re: [MYSQL](Hardcoding). Its not saving any rows. - by EiresJason - 15.04.2015, 18:40
Re: [MYSQL](Hardcoding). Its not saving any rows. - by PURG3D - 17.04.2015, 03:13
Re: [MYSQL](Hardcoding). Its not saving any rows. - by PURG3D - 17.04.2015, 07:02
Re: [MYSQL](Hardcoding). Its not saving any rows. - by EiresJason - 17.04.2015, 08:21
Re: [MYSQL](Hardcoding). Its not saving any rows. - by PURG3D - 17.04.2015, 11:25
Re: [MYSQL](Hardcoding). Its not saving any rows. - by PURG3D - 17.04.2015, 12:24
Re: [MYSQL](Hardcoding). Its not saving any rows. - by EiresJason - 17.04.2015, 12:52
Re: [MYSQL](Hardcoding). Its not saving any rows. - by PURG3D - 18.04.2015, 01:45
Re: [MYSQL](Hardcoding). Its not saving any rows. - by EiresJason - 18.04.2015, 10:53

Forum Jump:


Users browsing this thread: 7 Guest(s)