sql_create_property(kid) { new q[1500]; mysql_format(_dbConnector, q, sizeof(q), "INSERT INTO `propertys` (iSQLID,iOwnerSQLID,iOwned,iOwner,iEnter1,iEnter2,iEnter3,iExit1,iExit2,iExit3,iPrice,iLocked,iInterior,iVW,iVrsta,iOrmar,iSkin1,iSkin2,iSkin3, \ iSafeStatus,iSafePass,iOruzje1,iOruzje2,iOruzje3,iOruzje4,iMunicija1,iMunicija2,iMunicija3,iMunicija4,iDrugAmmount1,iDrugAmmount2,iDrugAmmount3,iDrugAmmount4,iDrugAmmount5,iDrugAmmount6,iDrugAmmount7,iDrugAmmount8, \ iDrugAmmount9,iDrugAmmount10,iDoorLevel,iAlarm,iLockLevel,iTime,iPizzaTime,iLevel,iAdress,iNeaktivnost,iRentable,iRentPrice,iRentovano,iMats,iMoney) \ VALUES('%d','%d','%d','%e','%f','%f','%f','%f','%f','%f','%d','%d','%d','%d','%d','%d','%d','%d','%d', \ '%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d', \ '%d','%d','%d','%d','%d','%d','%f','%d','%e','%d','%d','%d','%d','%d','%d')", II[kid][iSQLID],II[kid][iOwnerSQLID],II[kid][iOwned],II[kid][iOwner],II[kid][iEnter][0],II[kid][iEnter][1],II[kid][iEnter][2],II[kid][iExit][0],II[kid][iExit][1], II[kid][iExit][2],II[kid][iPrice],II[kid][iLocked],II[kid][iInterior],II[kid][iVW],II[kid][iVrsta],II[kid][iOrmar],II[kid][iSkin][0],II[kid][iSkin][1],II[kid][iSkin][2], II[kid][iSafeStatus],II[kid][iSafePass],II[kid][iOruzje][0],II[kid][iOruzje][1],II[kid][iOruzje][2],II[kid][iOruzje][3],II[kid][iMunicija][0],II[kid][iMunicija][1],II[kid][iMunicija][2],II[kid][iMunicija][3], II[kid][iDrugAmmount][0],II[kid][iDrugAmmount][1],II[kid][iDrugAmmount][2],II[kid][iDrugAmmount][3],II[kid][iDrugAmmount][4],II[kid][iDrugAmmount][5],II[kid][iDrugAmmount][6],II[kid][iDrugAmmount][7], II[kid][iDrugAmmount][8],II[kid][iDrugAmmount][9],II[kid][iDoorLevel],II[kid][iAlarm],II[kid][iLockLevel],II[kid][iTime],II[kid][iPizzaTime],II[kid][iLevel],II[kid][iAdress],II[kid][iNeaktivnost], II[kid][iRentable],II[kid][iRentPrice],II[kid][iRentovano],II[kid][iMats],II[kid][iMoney]); mysql_pquery(_dbConnector, q, "OnPropertyCreated", "i", kid); return true; }
error 075: input line too long (after substitutions) error 037: invalid string (possibly non-terminated string) error 017: undefined symbol "INSERT" error 017: undefined symbol "INTO" fatal error 107: too many error messages
SaveOrgInfo1(oid)
{
new DB_Query[1024];
mysql_format(Database, DB_Query, sizeof(DB_Query), "UPDATE `ORGANISATIONS` SET `NAME` = %s, `TYPE` = %d, `UNIQUEID` = %d, `LEADER` = %s, `COLEADER` = %s, `MEMBER1` = %s, `MEMBER2` = %s, `MEMBER3` = %s, `MEMBER4` = %s, `MEMBER5` = %s, `MEMBER6` = %s WHERE `ID` = %d LIMIT 1",
OrgInfo[oid][oName],
OrgInfo[oid][oType],
OrgInfo[oid][oUID],
OrgInfo[oid][oLeader],
OrgInfo[oid][oCoLeader],
OrgInfo[oid][oMember1],
OrgInfo[oid][oMember2],
OrgInfo[oid][oMember3],
OrgInfo[oid][oMember4],
OrgInfo[oid][oMember5],
OrgInfo[oid][oMember6],
OrgInfo[oid][oID]);
mysql_tquery(Database, DB_Query);
}
SaveOrgInfo2(oid)
{
new DB_Query[1024];
mysql_format(Database, DB_Query, sizeof(DB_Query), "UPDATE `ORGANISATIONS` SET `MEMBER7` = %s, `MEMBER8` = %s, `MEMBER9` = %s, `MEMBER10` = %s, `LEADER` = %s, `COLEADER` = %s, `SKIN1` = %d, `SKIN2` = %d, `SKIN3` = %d, `SKIN4` = %d, `SKIN5` = %d WHERE `ID` = %d LIMIT 1",
OrgInfo[oid][oMember7],
OrgInfo[oid][oMember8],
OrgInfo[oid][oMember9],
OrgInfo[oid][oMember10],
OrgInfo[oid][oLeader],
OrgInfo[oid][oCoLeader],
OrgInfo[oid][oSkin1],
OrgInfo[oid][oSkin2],
OrgInfo[oid][oSkin3],
OrgInfo[oid][oSkin4],
OrgInfo[oid][oSkin5],
OrgInfo[oid][oID]);
mysql_tquery(Database, DB_Query);
}
SaveOrganisationsData(oid)
{
SaveOrgInfo1(oid);
SaveOrgInfo2(oid);
}
See this for column limit.
The compiler will allow longer line lengths but that's just a workaround for a badly designed database. I understand you probably just want a workaround so that's fine, but in future consider re-structuring your database to take advantage of relations and other features of SQL. Otherwise, you might as well just use a flat INI file because your current schema looks like it would fit that nicely. Side note: it'll be easier to restructure now rather than later! |