Database_Exception [ 1452 ]: Cannot add or update a child row: a foreign key constraint fails (`kc360_main_godfather`.`mod_stats`, CONSTRAINT `mod_stats_fk_ad_id` FOREIGN KEY (`ad_id`) REFERENCES `ads` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) [ INSERT INTO mod_stats SET ad_id = 186508, month="03-2024", feature=1 ON DUPLICATE KEY UPDATE feature=feature+1 ]

MODPATH/database/classes/kohana/database/mysql.php [ 194 ]

189 			{
190 				// This benchmark is worthless
191 				Profiler::delete($benchmark);
192 			}
193 
194 			throw new Database_Exception(':error [ :query ]',
195 				array(':error' => mysql_error($this->_connection), ':query' => $sql),
196 				mysql_errno($this->_connection));
197 		}
198 
199 		if (isset($benchmark))
  1. MODPATH/database/classes/kohana/database/query.php [ 245 ] » Kohana_Database_MySQL->query(arguments)

  2. APPPATH/classes/helper/statistic.php [ 40 ] » Kohana_Database_Query->execute()

  3. APPPATH/classes/helper/ajax.php [ 82 ] » Helper_Statistic::store(arguments)

  4. APPPATH/classes/controller/desktop/ajax.php [ 55 ] » Helper_Ajax::featured_page(arguments)

  5. {PHP internal call} » Controller_Desktop_Ajax->action_featured_page()

  6. APPPATH/classes/request/client/internal.php [ 66 ] » ReflectionMethod->invoke(arguments)

  7. SYSPATH/classes/kohana/request/client.php [ 64 ] » Request_Client_Internal->execute_request(arguments)

  8. SYSPATH/classes/kohana/request.php [ 1154 ] » Kohana_Request_Client->execute(arguments)

  9. DOCROOT/index.php [ 110 ] » Kohana_Request->execute()

Environment