waypoint add

support forum

waypoint add

Postby wingower » Mon Aug 06, 2007 9:29 pm

When I try add takeoff in flight ( unknow takeoff ) I have this error ;

Error putting waypount to DB

Error in inserting waypoint info query!
wingower
 
Posts: 10
Joined: Mon Aug 06, 2007 4:59 pm

Postby manolis » Tue Aug 07, 2007 11:13 am

It seems that the leonardo_waypoints table has not been updated with the latest changes.

Can you give me an sql dump of the structure of the table
i need ONLY the structure NOT the data
manolis
Site Admin
 
Posts: 152
Joined: Fri Jun 24, 2005 2:04 pm

Postby manolis » Tue Aug 07, 2007 11:31 am

have you executed also the "upgrade_2.0.0_fixes.sql" ?
manolis
Site Admin
 
Posts: 152
Joined: Fri Jun 24, 2005 2:04 pm

Postby wingower » Tue Aug 07, 2007 7:09 pm

I'm sending my SQL dump

I have exucuted upgrade 2.0.0_fixe.sql
http://leonardo.thenet.gr/support/viewtopic.php?t=138 you can find in this link

# phpMyAdmin SQL Dump
# version 2.5.3
# http://www.phpmyadmin.net
#
# Host: localhost
# Generation Time: Aug 07, 2007 at 07:45 PM
# Server version: 4.0.25
# PHP Version: 4.3.10
#
#

# --------------------------------------------------------

#
# Table structure for table `leonardo_NAC_clubs`
#

CREATE TABLE `leonardo_NAC_clubs` (
`NAC_ID` mediumint(9) NOT NULL default '0',
`clubID` bigint(20) NOT NULL default '0',
`clubName` varchar(255) NOT NULL default '',
PRIMARY KEY (`NAC_ID`,`clubID`)
) TYPE=MyISAM;


#
# Table structure for table `leonardo_airspace`
#

CREATE TABLE `leonardo_airspace` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`Name` varchar(50) NOT NULL default '',
`serial` tinyint(4) NOT NULL default '0',
`disabled` tinyint(4) NOT NULL default '0',
`updated` tinyint(4) NOT NULL default '0',
`Type` varchar(30) NOT NULL default '',
`Shape` tinyint(3) unsigned NOT NULL default '0',
`Comments` varchar(255) NOT NULL default '',
`minx` float NOT NULL default '0',
`miny` float NOT NULL default '0',
`maxx` float NOT NULL default '0',
`maxy` float NOT NULL default '0',
`Base` blob NOT NULL,
`Top` blob NOT NULL,
`Points` mediumblob NOT NULL,
`Radius` float NOT NULL default '0',
`Latitude` float NOT NULL default '0',
`Longitude` float NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `Name` (`Name`,`serial`),
KEY `minx` (`minx`,`miny`,`maxx`,`maxy`),
KEY `serial` (`serial`,`disabled`),
KEY `serial_2` (`serial`,`disabled`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;


#
# Table structure for table `leonardo_areas`
#

CREATE TABLE `leonardo_areas` (
`areaID` mediumint(8) unsigned NOT NULL auto_increment,
`name` varchar(60) NOT NULL default '',
`desc` varchar(255) NOT NULL default '',
`descInt` varchar(255) NOT NULL default '',
PRIMARY KEY (`areaID`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;

#
# Dumping data for table `leonardo_areas`
#


# --------------------------------------------------------

#
# Table structure for table `leonardo_areas_takeoffs`
#

CREATE TABLE `leonardo_areas_takeoffs` (
`areaID` mediumint(8) unsigned NOT NULL default '0',
`takeoffID` mediumint(8) unsigned NOT NULL default '0'
) TYPE=MyISAM;

#
# Dumping data for table `leonardo_areas_takeoffs`
#


# --------------------------------------------------------

#
# Table structure for table `leonardo_clubs`
#

CREATE TABLE `leonardo_clubs` (
`ID` bigint(20) unsigned NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`intName` varchar(255) NOT NULL default '',
`description` text NOT NULL,
`intDescription` text NOT NULL,
`cat` smallint(5) unsigned NOT NULL default '1',
`location` varchar(60) NOT NULL default '',
`intLocation` varchar(60) NOT NULL default '',
`countryCode` varchar(30) NOT NULL default '',
`link` varchar(255) NOT NULL default '',
`club_admin` bigint(20) unsigned NOT NULL default '0',
`contact_person` varchar(255) NOT NULL default '',
`formula` smallint(6) NOT NULL default '0',
`formula_parameters` text NOT NULL,
`areaID` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;

#
# Dumping data for table `leonardo_clubs`
#


# --------------------------------------------------------

#
# Table structure for table `leonardo_clubs_flights`
#

CREATE TABLE `leonardo_clubs_flights` (
`clubID` mediumint(8) unsigned NOT NULL default '0',
`flightID` mediumint(8) unsigned NOT NULL default '0'
) TYPE=MyISAM;

#
# Dumping data for table `leonardo_clubs_flights`
#


# --------------------------------------------------------

#
# Table structure for table `leonardo_clubs_pilots`
#

CREATE TABLE `leonardo_clubs_pilots` (
`clubID` bigint(20) unsigned NOT NULL default '0',
`pilotID` bigint(20) unsigned NOT NULL default '0',
`pilotServerID` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`clubID`,`pilotID`,`pilotServerID`)
) TYPE=MyISAM;

#
# Dumping data for table `leonardo_clubs_pilots`
#


# --------------------------------------------------------

#
# Table structure for table `leonardo_flights`
#

CREATE TABLE `leonardo_flights` (
`ID` bigint(20) unsigned NOT NULL auto_increment,
`serverID` smallint(5) unsigned NOT NULL default '0',
`originalURL` varchar(255) NOT NULL default '',
`original_ID` mediumint(8) unsigned NOT NULL default '0',
`cat` smallint(5) unsigned NOT NULL default '1',
`subcat` smallint(5) unsigned NOT NULL default '1',
`active` smallint(6) NOT NULL default '0',
`dateAdded` datetime NOT NULL default '0000-00-00 00:00:00',
`timesViewed` mediumint(9) NOT NULL default '0',
`userID` mediumint(8) NOT NULL default '0',
`originalUserID` mediumint(8) unsigned NOT NULL default '0',
`userServerID` mediumint(8) unsigned NOT NULL default '0',
`filename` varchar(200) NOT NULL default '',
`place` varchar(100) NOT NULL default '',
`glider` varchar(50) NOT NULL default '',
`comments` text NOT NULL,
`linkURL` varchar(200) NOT NULL default '',
`hasPhotos` tinyint(3) unsigned NOT NULL default '0',
`photo1Filename` varchar(150) NOT NULL default '',
`photo2Filename` varchar(150) NOT NULL default '',
`photo3Filename` varchar(150) NOT NULL default '',
`takeoffID` mediumint(9) NOT NULL default '0',
`takeoffVinicity` float NOT NULL default '0',
`landingID` mediumint(9) NOT NULL default '0',
`landingVinicity` float NOT NULL default '0',
`DATE` date NOT NULL default '0000-00-00',
`timezone` float NOT NULL default '0',
`MAX_SPEED` float NOT NULL default '0',
`MEAN_SPEED` float NOT NULL default '0',
`MAX_ALT` int(11) NOT NULL default '0',
`MIN_ALT` int(11) NOT NULL default '0',
`TAKEOFF_ALT` int(11) NOT NULL default '0',
`MAX_VARIO` float NOT NULL default '0',
`MIN_VARIO` float NOT NULL default '0',
`LINEAR_DISTANCE` bigint(20) NOT NULL default '0',
`MAX_LINEAR_DISTANCE` bigint(20) NOT NULL default '0',
`START_TIME` mediumint(9) NOT NULL default '0',
`END_TIME` mediumint(9) NOT NULL default '0',
`DURATION` mediumint(9) NOT NULL default '0',
`BEST_FLIGHT_TYPE` varchar(30) NOT NULL default '',
`FLIGHT_KM` float NOT NULL default '0',
`FLIGHT_POINTS` float NOT NULL default '0',
`autoScore` float NOT NULL default '0',
`FIRST_POINT` varchar(50) NOT NULL default '',
`LAST_POINT` varchar(50) NOT NULL default '',
`turnpoint1` varchar(100) NOT NULL default '',
`turnpoint2` varchar(100) NOT NULL default '',
`turnpoint3` varchar(100) NOT NULL default '',
`turnpoint4` varchar(100) NOT NULL default '',
`turnpoint5` varchar(100) NOT NULL default '',
`olcRefNum` varchar(30) NOT NULL default '',
`olcFilename` varchar(12) NOT NULL default '',
`olcDateSubmited` datetime NOT NULL default '0000-00-00 00:00:00',
`private` tinyint(3) unsigned NOT NULL default '0',
`gpsTrack` tinyint(3) unsigned NOT NULL default '1',
`category` smallint(5) unsigned NOT NULL default '2',
`gliderBrandID` smallint(5) unsigned NOT NULL default '0',
`photo4Filename` varchar(150) NOT NULL default '',
`photo5Filename` varchar(150) NOT NULL default '',
`photo6Filename` varchar(150) NOT NULL default '',
`grecord` smallint(6) NOT NULL default '0',
`validated` smallint(6) NOT NULL default '0',
`validationMessage` text NOT NULL,
`airspaceCheck` tinyint(4) NOT NULL default '0',
`airspaceCheckFinal` tinyint(4) NOT NULL default '0',
`airspaceCheckMsg` text NOT NULL,
`checkedBy` varchar(100) NOT NULL default '',
`NACclubID` bigint(20) NOT NULL default '0',
`hash` varchar(100) NOT NULL default '',
`batchOpProcessed` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`ID`),
KEY `userID` (`userID`),
KEY `takeoffID` (`takeoffID`),
KEY `takeoffID_2` (`takeoffID`),
KEY `takeoffID_3` (`takeoffID`),
KEY `takeoffID_4` (`takeoffID`),
KEY `takeoffID_5` (`takeoffID`),
KEY `takeoffID_6` (`takeoffID`),
KEY `takeoffID_7` (`takeoffID`),
KEY `takeoffID_8` (`takeoffID`)
) TYPE=MyISAM AUTO_INCREMENT=471 ;


#
# Table structure for table `leonardo_log`
#

CREATE TABLE `leonardo_log` (
`transactionID` bigint(20) unsigned NOT NULL auto_increment,
`actionTime` bigint(20) unsigned NOT NULL default '0',
`userID` mediumint(8) unsigned NOT NULL default '0',
`effectiveUserID` mediumint(8) unsigned NOT NULL default '0',
`ItemType` mediumint(8) unsigned NOT NULL default '0',
`ItemID` mediumint(8) unsigned NOT NULL default '0',
`ServerItemID` mediumint(8) unsigned NOT NULL default '0',
`ActionID` mediumint(8) unsigned NOT NULL default '0',
`ActionXML` text NOT NULL,
`Modifier` mediumint(8) unsigned NOT NULL default '0',
`ModifierID` mediumint(8) unsigned NOT NULL default '0',
`ServerModifierID` mediumint(8) unsigned NOT NULL default '0',
`Result` mediumint(8) unsigned NOT NULL default '0',
`ResultDescription` text NOT NULL,
PRIMARY KEY (`transactionID`)
) TYPE=MyISAM AUTO_INCREMENT=59 ;



#
# Table structure for table `leonardo_maps`
#

CREATE TABLE `leonardo_maps` (
`ID` bigint(20) NOT NULL auto_increment,
`filename` varchar(200) NOT NULL default '',
`leftX` double(10,2) NOT NULL default '0.00',
`topY` double(10,2) NOT NULL default '0.00',
`rightX` double(10,2) NOT NULL default '0.00',
`bottomY` double(10,2) NOT NULL default '0.00',
`UTMzone` smallint(6) NOT NULL default '0',
`pixelWidth` mediumint(9) NOT NULL default '0',
`pixelHeight` mediumint(9) NOT NULL default '0',
`metersPerPixel` float(7,5) NOT NULL default '0.00000',
PRIMARY KEY (`ID`,`filename`),
UNIQUE KEY `filename` (`filename`)
) TYPE=MyISAM PACK_KEYS=0 AUTO_INCREMENT=3811 ;


#
# Table structure for table `leonardo_photos`
#

CREATE TABLE `leonardo_photos` (
`ID` bigint(20) unsigned NOT NULL auto_increment,
`flightID` mediumint(8) unsigned NOT NULL default '0',
`path` varchar(255) NOT NULL default '',
`name` varchar(255) NOT NULL default '',
`description` text NOT NULL,
PRIMARY KEY (`ID`),
KEY `flightID` (`flightID`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;


# --------------------------------------------------------

#
# Table structure for table `leonardo_pilots`
#

CREATE TABLE `leonardo_pilots` (
`pilotID` bigint(20) NOT NULL default '0',
`serverID` smallint(5) unsigned NOT NULL default '0',
`olcBirthDate` varchar(8) NOT NULL default '',
`olcFirstName` varchar(100) NOT NULL default '',
`olcLastName` varchar(100) NOT NULL default '',
`olcCallSign` varchar(50) NOT NULL default '',
`olcFilenameSuffix` varchar(4) NOT NULL default '',
`olcAutoSubmit` tinyint(4) NOT NULL default '0',
`FirstName` varchar(40) NOT NULL default '',
`LastName` varchar(50) NOT NULL default '',
`clubID` mediumint(8) unsigned NOT NULL default '0',
`sponsor` varchar(255) default NULL,
`Sex` varchar(6) NOT NULL default '',
`Birthdate` varchar(15) NOT NULL default '',
`Occupation` varchar(100) NOT NULL default '',
`MartialStatus` varchar(20) NOT NULL default '',
`OtherInterests` longtext NOT NULL,
`PersonalWebPage` varchar(150) NOT NULL default '',
`PilotLicence` varchar(100) NOT NULL default '',
`BestMemory` longtext NOT NULL,
`WorstMemory` longtext NOT NULL,
`Training` varchar(200) NOT NULL default '',
`personalDistance` varchar(150) NOT NULL default '',
`personalHeight` varchar(150) NOT NULL default '',
`glider` varchar(200) NOT NULL default '',
`FlyingSince` varchar(100) NOT NULL default '',
`HoursFlown` varchar(50) NOT NULL default '',
`HoursPerYear` varchar(50) NOT NULL default '',
`FavoriteLocation` varchar(250) NOT NULL default '',
`UsualLocation` varchar(150) NOT NULL default '',
`FavoriteBooks` varchar(150) NOT NULL default '',
`FavoriteActors` varchar(150) NOT NULL default '',
`FavoriteSingers` varchar(150) NOT NULL default '',
`FavoriteMovies` varchar(150) NOT NULL default '',
`FavoriteSite` varchar(150) NOT NULL default '',
`Sign` varchar(40) NOT NULL default '',
`Spiral` varchar(60) NOT NULL default '',
`Bline` varchar(100) NOT NULL default '',
`FullStall` varchar(100) NOT NULL default '',
`Sat` varchar(100) NOT NULL default '',
`AsymmetricSpiral` varchar(100) NOT NULL default '',
`Spin` varchar(100) NOT NULL default '',
`OtherAcro` varchar(150) NOT NULL default '',
`camera` varchar(150) NOT NULL default '',
`camcorder` varchar(150) NOT NULL default '',
`Vario` varchar(60) NOT NULL default '',
`GPS` varchar(60) NOT NULL default '',
`Harness` varchar(60) NOT NULL default '',
`Reserve` varchar(60) NOT NULL default '',
`Helmet` varchar(60) NOT NULL default '',
`PilotPhoto` varchar(30) NOT NULL default '',
`countryCode` char(2) NOT NULL default '',
`CIVL_ID` mediumint(8) unsigned NOT NULL default '0',
`NACid` int(10) unsigned NOT NULL default '0',
`NACmemberID` bigint(20) unsigned NOT NULL default '0',
`NACclubID` bigint(20) NOT NULL default '0',
PRIMARY KEY (`pilotID`,`serverID`)
) TYPE=MyISAM;



#
# Table structure for table `leonardo_servers`
#

CREATE TABLE `leonardo_servers` (
`ID` mediumint(8) unsigned NOT NULL auto_increment,
`isLeo` tinyint(3) unsigned NOT NULL default '0',
`installation_type` smallint(5) unsigned NOT NULL default '2',
`leonardo_version` varchar(20) NOT NULL default '',
`url` varchar(255) NOT NULL default '',
`url_base` varchar(255) NOT NULL default '',
`url_op` varchar(255) NOT NULL default '',
`admin_email` varchar(100) NOT NULL default '',
`site_pass` varchar(100) NOT NULL default '',
`serverPass` varchar(50) NOT NULL default '',
`clientPass` varchar(50) NOT NULL default '',
`lastPullUpdateID` bigint(20) unsigned NOT NULL default '0',
`is_active` tinyint(3) unsigned NOT NULL default '0',
`gives_waypoints` tinyint(3) unsigned NOT NULL default '0',
`waypoint_countries` varchar(255) NOT NULL default '',
PRIMARY KEY (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;


#
# Table structure for table `leonardo_stats`
#

CREATE TABLE `leonardo_stats` (
`tm` bigint(20) unsigned NOT NULL default '0',
`year` smallint(5) unsigned NOT NULL default '0',
`month` tinyint(3) unsigned NOT NULL default '0',
`day` tinyint(3) unsigned NOT NULL default '0',
`userID` bigint(20) unsigned NOT NULL default '0',
`sessionID` bigint(20) unsigned NOT NULL default '0',
`visitorID` bigint(20) unsigned NOT NULL default '0',
`op` char(25) NOT NULL default '',
`flightID` bigint(20) unsigned NOT NULL default '0',
`executionTime` float unsigned NOT NULL default '0',
`os` char(20) NOT NULL default '',
`browser` char(15) NOT NULL default '',
`browser_version` char(10) NOT NULL default '',
KEY `tm` (`tm`,`year`,`month`,`day`)
) TYPE=MyISAM;


#
# Table structure for table `leonardo_waypoints`
#

CREATE TABLE `leonardo_waypoints` (
`ID` mediumint(9) NOT NULL default '0',
`name` varchar(100) NOT NULL default '',
`intName` varchar(100) NOT NULL default '',
`lat` float NOT NULL default '0',
`lon` float NOT NULL default '0',
`type` int(11) NOT NULL default '0',
`countryCode` varchar(10) NOT NULL default 'GR',
`location` varchar(100) NOT NULL default '',
`intLocation` varchar(100) NOT NULL default '',
`link` varchar(255) NOT NULL default '',
`description` text NOT NULL,
`modifyDate` date NOT NULL default '2005-09-01',
PRIMARY KEY (`ID`),
KEY `lat` (`lat`,`lon`),
KEY `lat_2` (`lat`,`lon`)
) TYPE=MyISAM PACK_KEYS=0;
wingower
 
Posts: 10
Joined: Mon Aug 06, 2007 4:59 pm

Postby manolis » Wed Aug 08, 2007 10:23 am

try this :

open file CL_gpsPoint.php

and replace line 368 which reads
echo "Error putting waypount to DB <BR>";
with
echo "Error putting waypount to DB $query<BR>";

This will output also the sql query which gives the error.
Try to execute this query with phpmyadmin and see the more descriptive error.

Post both the query and sql error description here
manolis
Site Admin
 
Posts: 152
Joined: Fri Jun 24, 2005 2:04 pm

Postby wingower » Wed Aug 08, 2007 5:49 pm

When I try add takeoff ( http://www.ypforum.com/modules.php?name ... ightID=401 ) , I have this error

Error putting waypount to DB INSERT INTO leonardo_waypoints ( modifyDate, name ,intName, lat,lon, type, location ,intLocation ,countryCode , link, description ) VALUES ( now(), 'Eryiğit Sivrihisar', 'Eryigit Sivrihisar', 39.297066666667, -31.7445 , 1000, 'Ankara', 'Ankara', 'TR' , '' , 'Eryigit Sivrihisar' )

Error in inserting waypoint info query!


When I try execute this query with phpmyadmin , I have this error

SQL-query :

INSERT INTO leonardo_waypoints( modifyDate, name, intName, lat, lon,
TYPE , location, intLocation, countryCode, link, description )
VALUES (

now( ) , 'Eryiğit Sivrihisar', 'Eryigit Sivrihisar', 39.297066666667, - 31.7445, 1000, 'Ankara', 'Ankara', 'TR', '', 'Eryigit Sivrihisar'
)

MySQL said:


#1062 - Duplicate entry '0' for key 1


Thanks
wingower
 
Posts: 10
Joined: Mon Aug 06, 2007 4:59 pm

Postby wingower » Wed Aug 08, 2007 7:32 pm

Admin Log ( capture ) ; http://www.ypforum.com/capture1.jpg

Admin log - when I click detail ( capture ) ; http://www.ypforum.com/capture2.jpg
wingower
 
Posts: 10
Joined: Mon Aug 06, 2007 4:59 pm

Postby wingower » Thu Aug 09, 2007 7:45 am

Hi Manolis,

When I was using the version 1.5.0.2 , I replaced the waypoints database (inside the zip file - leonardo_waypoints.sql._2007_02_21.zip) with another database which is loaded at my web site. Then I added a new take off. But I think there is a problem about this take off. Because when I try to delete this take off , I see this error:

Error in deleting waypoint from DB!

Can I delete this take off from phpmyadmin? does it work?

The take off which I added it when I was using the version 1.5.0.2 is shown at phpmyadmin like this:

INSERT INTO `leonardo_waypoints` VALUES (0, 'Racon', 'Racon - TR', '39.6493', '-32.842', 1000, 'TR', 'Ankara', 'Ankara - TR', '', 'Racon Tepe - Ankara', '2007-07-29');

Regards
wingower
 
Posts: 10
Joined: Mon Aug 06, 2007 4:59 pm

Postby manolis » Thu Aug 09, 2007 10:28 am

This should fix the problem

DELETE FROM `leonardo_waypoints` WHERE ID=0;

ALTER TABLE `leonardo_waypoints` CHANGE `ID` `ID` MEDIUMINT( 9 ) NOT NULL AUTO_INCREMENT ;
manolis
Site Admin
 
Posts: 152
Joined: Fri Jun 24, 2005 2:04 pm

Postby wingower » Thu Aug 09, 2007 12:09 pm

Thanks for your help , now it's working.

best regards
wingower
 
Posts: 10
Joined: Mon Aug 06, 2007 4:59 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Bridge by mehdiplugins.com