I'm having a problem building the SQL table for my DD's. Anyone able to help me build it?
pawn Код:
cache_get_field_content(iRow, "entranceDBID", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_iDBID] = strval(szResult);
cache_get_field_content(iRow, "entranceName", entranceData[iRow][e_szName], g_iConnectionHandle[0], sizeof szResult);
cache_get_field_content(iRow, "entranceExteriorVW", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_iVW][0] = strval(szResult);
cache_get_field_content(iRow, "entranceInteriorVW", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_iVW][1] = strval(szResult);
cache_get_field_content(iRow, "entranceExteriorIntWorld", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_iInteriorWorld][0] = strval(szResult);
cache_get_field_content(iRow, "entranceInteriorIntWorld", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_iInteriorWorld][1] = strval(szResult);
cache_get_field_content(iRow, "entranceExteriorPosX", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_fExterior][0] = floatstr(szResult);
cache_get_field_content(iRow, "entranceExteriorPosY", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_fExterior][1] = floatstr(szResult);
cache_get_field_content(iRow, "entranceExteriorPosZ", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_fExterior][2] = floatstr(szResult);
cache_get_field_content(iRow, "entranceExteriorPosA", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_fExterior][3] = floatstr(szResult);
cache_get_field_content(iRow, "entranceInteriorPosX", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_fInterior][0] = floatstr(szResult);
cache_get_field_content(iRow, "entranceInteriorPosY", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_fInterior][1] = floatstr(szResult);
cache_get_field_content(iRow, "entranceInteriorPosZ", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_fInterior][2] = floatstr(szResult);
cache_get_field_content(iRow, "entranceInteriorPosA", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_fInterior][3] = floatstr(szResult);
cache_get_field_content(iRow, "entranceStreamedExterior", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_iStreamed][0] = strval(szResult);
cache_get_field_content(iRow, "entranceStreamedInterior", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_iStreamed][1] = strval(szResult);
cache_get_field_content(iRow, "entranceVIP", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_iVIP] = strval(szResult); //
cache_get_field_content(iRow, "entranceGang", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_iGang] = strval(szResult);
cache_get_field_content(iRow, "entranceGroup", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_iGroup] = strval(szResult);
cache_get_field_content(iRow, "entranceGroupType", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_iGroupType] = strval(szResult);
cache_get_field_content(iRow, "entranceAdmin", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_iAdmin] = strval(szResult);
cache_get_field_content(iRow, "entranceOwnerDBID", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_iOwnerDBID] = strval(szResult);
cache_get_field_content(iRow, "entranceOwnerName", entranceData[iRow][e_szOwnerName], g_iConnectionHandle[0], MAX_PLAYER_NAME);
cache_get_field_content(iRow, "entranceWantedLevel", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_iWantedLevel] = strval(szResult);
cache_get_field_content(iRow, "entranceVehicleAble", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_iVehicleAble] = strval(szResult);
cache_get_field_content(iRow, "entranceColour", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_iColour] = strval(szResult);
cache_get_field_content(iRow, "entrancePickupModel", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_iPickupModel] = strval(szResult);
cache_get_field_content(iRow, "entranceLocked", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_iLocked] = strval(szResult);
cache_get_field_content(iRow, "entrancePass", entranceData[iRow][e_szPass], g_iConnectionHandle[0], sizeof szResult);
cache_get_field_content(iRow, "entranceTracable", szResult, g_iConnectionHandle[0], sizeof szResult); entranceData[iRow][e_iTraceable] = strval(szResult);
If it's a MySQL server, connect to it via PHPMyAdmin and create the tables, if it's SQLite, then use one of the many SQLite editors found through ****** and create it using that.
Yeah, I know how to create the table, it's just that it doesn't seem to create correctly (Won't insert things properly due to it not being setup correctly)
There's something new now, after the sql is created, when I create and entrance IG, it creates it saying inserted into DBID 0 however once I check the DB, there is no DBID beside it so then when I try edit the door or remove it, it says that ID 0 is not a valid entrance.
Did you resolve this mate? Make sure you use auto increment on the "entranceDBID" row.
I would send you the table if I still had it... I'm sure I put it in the script somewhere anyway :3
Edit: Yes I did.
pawn Код:
CREATE TABLE `entrances` (
`entranceDBID` INT(11) NOT NULL AUTO_INCREMENT,
`entranceName` VARCHAR(128) NULL DEFAULT '',
`entranceExteriorVW` INT(11) NULL DEFAULT '0',
`entranceInteriorVW` INT(11) NULL DEFAULT '0',
`entranceExteriorIntWorld` INT(11) NULL DEFAULT '0',
`entranceInteriorIntWorld` INT(11) NULL DEFAULT '0',
`entranceExteriorPosX` VARCHAR(64) NULL DEFAULT '0.0',
`entranceExteriorPosY` VARCHAR(64) NULL DEFAULT '0.0',
`entranceExteriorPosZ` VARCHAR(64) NULL DEFAULT '0.0',
`entranceExteriorPosA` VARCHAR(64) NULL DEFAULT '0.0',
`entranceInteriorPosX` VARCHAR(64) NULL DEFAULT '0.0',
`entranceInteriorPosY` VARCHAR(64) NULL DEFAULT '0.0',
`entranceInteriorPosZ` VARCHAR(64) NULL DEFAULT '0.0',
`entranceInteriorPosA` VARCHAR(64) NULL DEFAULT '0.0',
`entranceStreamedExterior` INT(11) NULL DEFAULT '0',
`entranceStreamedInterior` INT(11) NULL DEFAULT '0',
`entranceVIP` INT(11) NULL DEFAULT '0',
`entranceGang` INT(11) NULL DEFAULT '255',
`entranceGroup` INT(11) NULL DEFAULT '255',
`entranceGroupType` INT(11) NULL DEFAULT '0',
`entranceAdmin` INT(11) NULL DEFAULT '0',
`entranceOwnerDBID` INT(11) NULL DEFAULT '0',
`entranceOwnerName` VARCHAR(24) NULL DEFAULT '',
`entranceWantedLevel` INT(11) NULL DEFAULT '0',
`entranceVehicleAble` INT(11) NULL DEFAULT '0',
`entranceColour` INT(11) NULL DEFAULT '0',
`entrancePickupModel` INT(11) NULL DEFAULT '0',
`entranceLocked` INT(11) NULL DEFAULT '0',
`entrancePass` INT(11) NULL DEFAULT '0',
`entranceTracable` INT(11) NULL DEFAULT '0',
PRIMARY KEY (`entranceDBID`)
)