Error Dynamic Selection List

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
Indra
User
Posts: 3

Re: Error Dynamic Selection List

Post by Indra »

add, add grid, and inline add, error if multi select
categoryID > subcategoryID ?

sample:

table 1
categoryID
category

table 2
subcategoryID
categoryID
subcategory

table 3
contentID
categoryID
subcategoryID
content

category not view but subcategory view and i see


mobhar
User
Posts: 11734

Post by mobhar »

Please post your tables schema (CREATE TABLE statement) including some records in it (INSERT INTO statement).


Indra
User
Posts: 3

Post by Indra »

mobhar wrote:
Please post your tables schema (CREATE TABLE statement) including some
records in it (INSERT INTO statement).

-- phpMyAdmin SQL Dump

-- version 4.2.7.1

-- Host: 127.0.0.1
-- Generation Time: Dec 18, 2014 at 06:18 AM
-- Server version: 5.6.20
-- PHP Version: 5.5.15

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

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT /;
/
!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS /;
/
!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION /;
/
!40101 SET NAMES utf8 */;


--

-- Table structure for table category

CREATE TABLE IF NOT EXISTS category (
categoryID int(11) NOT NULL,
category varchar(50) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;


--

-- Table structure for table content

CREATE TABLE IF NOT EXISTS content (
contentID int(11) NOT NULL,
categoryID int(11) NOT NULL,
subcategoryID int(11) NOT NULL,
content varchar(50) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;


--

-- Table structure for table subcategory

CREATE TABLE IF NOT EXISTS subcategory (
subcategoryID int(11) NOT NULL,
categoryID int(11) NOT NULL,
subcategory varchar(50) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--

-- Indexes for dumped tables

--
-- Indexes for table category

ALTER TABLE category
ADD PRIMARY KEY (categoryID);

--

-- Indexes for table content

ALTER TABLE content
ADD PRIMARY KEY (contentID);

--

-- Indexes for table subcategory

ALTER TABLE subcategory
ADD PRIMARY KEY (subcategoryID);

--

-- AUTO_INCREMENT for dumped tables

--
-- AUTO_INCREMENT for table category

ALTER TABLE category

MODIFY categoryID int(11) NOT NULL AUTO_INCREMENT;

-- AUTO_INCREMENT for table content

ALTER TABLE content

MODIFY contentID int(11) NOT NULL AUTO_INCREMENT;

-- AUTO_INCREMENT for table subcategory

ALTER TABLE subcategory
MODIFY subcategoryID int(11) NOT NULL AUTO_INCREMENT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT /;
/
!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS /;
/
!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

in Content table


mobhar
User
Posts: 11734

Post by mobhar »

Where are the records? Please post some records in each table (INSERT INTO statement).


Indra
User
Posts: 3

Post by Indra »

mobhar wrote:
Where are the records? Please post some records in each table (INSERT INTO
statement).

???
my table is 3 table in PHP MAker program
that can't selection list in grid add, inline add,
categoryID > subcategoryID but in categoryID not chosen

contentID : {default auto increment}
categoryID : Select Fill << not choosen ???
subcategory : Sub Category 1
content : We Love Crab
{button submit}

master detail table : 1 2 3
category.categoryID 1:M subcategory.categoryID
category.categoryID 1:M content.categoryID
subcategory.subcategoryID 1:M content.subcategoryID

...?????????????????????????????????????????????????????????????


mobhar
User
Posts: 11734

Post by mobhar »

I think you don't understand the meaning of Records.

Please dump your those 3 tables including some Records in those 3 tables. Assume you have done some experiments using those 3 tables for your dynamic selection list. In other words, you should keep the Records (do not remove/delete them) in order to get "INSERT INTO ..." statement to generate the .sql that contains the Records.


Post Reply