Código:
y por si os sirve el print_r que me muestra el fallo:global $wpdb; $wpdb->print_error(); $query = "INSERT INTO $wpdb->mi_rutas (id_ruta, nombre_ruta, descr_ruta, inicio_ruta, fin_ruta, id_comarca_ruta, homologado_ruta, dificultad_ruta, distancia_ruta, medio_ruta, archivo_ruta) VALUES (%d,%s,%s,%s,%s,%d,%d,%d,%d,%d,%s)"; $wpdb->query($wpdb->prepare($query, 'null', $nombre,$desc,$inicio_ruta,$fin_ruta,$comarca,$oficial,$dificultad,$dist_ruta,$medio,$ruta));
Código:
wpdb Object ( [show_errors] => [suppress_errors] => [last_error] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(id_ruta, nombre_ruta, descr_ruta, inicio_ruta, fin_ruta, id_comarca_ruta, homol' at line 1 [num_queries] => 16 [num_rows] => 9 [rows_affected] => 0 [insert_id] => 0 [last_query] => INSERT INTO (id_ruta, nombre_ruta, descr_ruta, inicio_ruta, fin_ruta, id_comarca_ruta, homologado_ruta, dificultad_ruta, distancia_ruta, medio_ruta, archivo_ruta) VALUES (0,'prueba11111','4y65y65yhu76u','erger','wreftet',1,1,2,453,2,'rutas/1353582647.inutil.kml') [last_result] => Array ( ) [col_info] => [queries] => [prefix] => p1_ [ready] => 1 [blogid] => 0 [siteid] => 0 [tables] => Array ( [0] => posts [1] => comments [2] => links [3] => options [4] => postmeta [5] => terms [6] => term_taxonomy [7] => term_relationships [8] => commentmeta ) [old_tables] => Array ( [0] => categories [1] => post2cat [2] => link2cat ) [global_tables] => Array ( [0] => users [1] => usermeta ) [ms_global_tables] => Array ( [0] => blogs [1] => signups [2] => site [3] => sitemeta [4] => sitecategories [5] => registration_log [6] => blog_versions ) [comments] => p1_comments [commentmeta] => p1_commentmeta [links] => p1_links [options] => p1_options [postmeta] => p1_postmeta [posts] => p1_posts [terms] => p1_terms [term_relationships] => p1_term_relationships [term_taxonomy] => p1_term_taxonomy [usermeta] => p1_usermeta [users] => p1_users [blogs] => [blog_versions] => [registration_log] => [signups] => [site] => [sitecategories] => [sitemeta] => [field_types] => Array ( [post_author] => %d [post_parent] => %d [menu_order] => %d [term_id] => %d [term_group] => %d [term_taxonomy_id] => %d [parent] => %d [count] => %d [object_id] => %d [term_order] => %d [ID] => %d [commment_ID] => %d [comment_post_ID] => %d [comment_parent] => %d [user_id] => %d [link_id] => %d [link_owner] => %d [link_rating] => %d [option_id] => %d [blog_id] => %d [meta_id] => %d [post_id] => %d [user_status] => %d [umeta_id] => %d [comment_karma] => %d [comment_count] => %d [active] => %d [cat_id] => %d [deleted] => %d [lang_id] => %d [mature] => %d [public] => %d [site_id] => %d [spam] => %d ) [charset] => utf8 [collate] => [real_escape] => 1 [dbuser] => root [func_call] => $db->query("INSERT INTO (id_ruta, nombre_ruta, descr_ruta, inicio_ruta, fin_ruta, id_comarca_ruta, homologado_ruta, dificultad_ruta, distancia_ruta, medio_ruta, archivo_ruta) VALUES (0,'prueba11111','4y65y65yhu76u','erger','wreftet',1,1,2,453,2,'rutas/1353582647.inutil.kml')") [is_mysql] => 1 [dbpassword] => root [dbname] => prueba1 [dbhost] => localhost [dbh] => Resource id #21 [base_prefix] => p1_ [categories] => p1_categories [post2cat] => p1_post2cat [link2cat] => p1_link2cat [result] => ) el archivo ha sido movido exitosamente
muchas graciassssss!!!!!!!!!!!