About Taringa!

Popular channels

[Solved] No me guarda la categoria

Hola Broths de DPW quería pedir ayuda esta vez por un error que nose porque me da ya e tratado de solucionarlo pero nada de lo cansado que estoy ni veo bien quizas me puedan ayudar un poco hay a identificar el error se les agradece
aquí una imagen del modelo relacion

aquí el código mysql
-- phpMyAdmin SQL Dump
-- version 3.5.8.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 13, 2013 at 07:46 AM
-- Server version: 5.5.32-MariaDB
-- PHP Version: 5.5.4

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @[email protected]@CHARACTER_SET_CLIENT */;
/*!40101 SET @[email protected]@CHARACTER_SET_RESULTS */;
/*!40101 SET @[email protected]@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `images`
--

-- --------------------------------------------------------

--
-- Table structure for table `imagenes`
--

CREATE TABLE IF NOT EXISTS `imagenes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(36) NOT NULL,
  `categoria` varchar(68) NOT NULL,
  `ruta` varchar(54) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;

--
-- Dumping data for table `imagenes`
--

INSERT INTO `imagenes` (`id`, `name`, `categoria`, `ruta`) VALUES
(14, 'rrrrrrrr', '', 'imagenes/glyphicons_468_server_lock.png');

-- --------------------------------------------------------

--
-- Table structure for table `positions`
--

CREATE TABLE IF NOT EXISTS `positions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cat` varchar(70) NOT NULL,
  `imagenes_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_positions_imagenes_idx` (`imagenes_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;

--
-- Dumping data for table `positions`
--

INSERT INTO `positions` (`id`, `cat`, `imagenes_id`) VALUES
(1, 'page1', 0),
(2, 'page2', 0),
(3, 'page3', 0),
(4, 'page4', 0),
(5, 'page5', 0),
(6, 'page6', 0),
(7, 'page7', 0);

--
-- Constraints for dumped tables
--

--
-- Constraints for table `positions`
--
ALTER TABLE `positions`
  ADD CONSTRAINT `fk_positions_imagenes` FOREIGN KEY (`imagenes_id`) REFERENCES `imagenes` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;

/*!40101 SET [email protected]_CHARACTER_SET_CLIENT */;
/*!40101 SET [email protected]_CHARACTER_SET_RESULTS */;
/*!40101 SET [email protected]_COLLATION_CONNECTION */; 


y aquí el resto de código
https://gist.github.com/leomalaveraG/6852acfa961040022354
esta en un gist no estoy poniendo enlaces de descarga ni nada gracias desde ya y cualquier comentario es bien recibido
0No comments yet