Jump to content

Recommended Posts

My CREATE TABLE list seems not to work... I've used this before or so I thought with no issue. Can anyone here find out what my issue is? I've gone through my books, they look identical... at least in format. So I don't know what I am missing, can anyone see what I've missed?

 

Thanks

 

CREATE TABLE 'ncmr' (
    'id' INT AUTO_INCREMENT,
    'Added_By' VARCHAR(80),
    'Added_By_Date' DATE
    'Nexx_Part' VARCHAR(60),
    'Nexx_Part_Description' VARCHAR(90),
    'NCMR_Qty' VARCHAR(20),
    'JO' VARCHAR(20),
    'SN' VARCHAR(20),
    'INV' VARCHAR(20),
    'Nexx_Inventory_On_Hand' VARCHAR(20),
    'Nexx_Inventory_Chk' VARCHAR(20),
    'Supplier_Name' VARCHAR(60),
    'Supplier_Number' VARCHAR(60),
    'Manufacturer_Part_Number' VARCHAR(60),
    'Manufacturer_Serial_Number' VARCHAR(60),
    'NCMR_ID' VARCHAR(20),
    'Nonconformity' MEDIUMTEXT,
    'Disposition' MEDIUMTEXT,
    'Comments' MEDIUMTEXT,
    'CommentsAdditional_Details' MEDIUMTEXT,
    'PO' VARCHAR(20),
    'PO_Date' DATE,
    'Date_Received' DATE,
    'ncmrsr' MEDIUMTEXT,
    'ncmrsc' MEDIUMTEXT,
    PRIMARY KEY ('id')
);



INSERT INTO ncmr VALUES (
'1',
'Peter Teigeler',
'7/7/2011',
'K11205368',
'1',
'Assy, CMM Module w/window & Cover',
'2',
'I8778',
'164',
'N/A',
'N/A',
'Plastic Design Inc',
'100255',
'K11205386',
'N/A',
'N/A',
'1054',
'Not made to print, missing 2 proximity sensor mouting brackets. These need to be welded in place.',
'Return to vendor for rework, or have vendor come in and rework on site.'
);

Link to comment
https://forums.phpfreaks.com/topic/251636-my-create-table-list-seems-not-to-work/
Share on other sites


CREATE TABLE `ncmr`(
`id` INT AUTO_INCREMENT VARCHAR (11),
`Added_By` VARCHAR(80),
`Added_By_Date` DATE,
`Nexx_Part` VARCHAR(60),
`Nexx_Rev`(15),
`Nexx_Part_Description` VARCHAR(90),
`NCMR_Qty` VARCHAR(20),
`JO` VARCHAR(20),
`SN` VARCHAR(20),
`INV` VARCHAR(20),
`Nexx_Inventory_On_Hand` VARCHAR(20),
`Nexx_Inventory_Chk` VARCHAR(20),
`Supplier_Name` VARCHAR(60),
`Supplier_Number` VARCHAR(60),
`Manufacturer_Part_Number` VARCHAR(60),
`Manufacturer_Serial_Number` VARCHAR(60),
`NCMR_ID` VARCHAR(20),
`Nonconformity` MEDIUMTEXT,
`Disposition` MEDIUMTEXT,
`Comments` MEDIUMTEXT,
`CommentsAdditional_Details` MEDIUMTEXT,
`PO` VARCHAR(20),
`PO_Date` DATE,
`Date_Received` DATE,
`ncmrsr` MEDIUMTEXT,
`ncmrsc` MEDIUMTEXT,
PRIMARY KEY (`id`)
)

INSERT INTO ncmr VALUES (
`1`,
`1054`,
`Peter Teigeler`,
`7/7/2011`,
`K11205368`,
`1`,
`Assy, CMM Module w/window & Cover`,
`2`,
`I8778`,
`164`,
`N/A`,
`N/A`,
`Plastic Design Inc`,
`100255`,
`K11205386`,
`N/A`,
`Not made to print, missing 2 proximity sensor mouting brackets. These need to be welded in place.`,
`Return to vendor for rework, or have vendor come in and rework on site.`
`N/A`
`N/A`
`N/A`
`N/A`
`N/A`
);

you do not have a type defined in a spot..

 

I added

<- HERE

to the code for you to see it.

 

CREATE TABLE `ncmr`(
`id` INT AUTO_INCREMENT VARCHAR (11),
`Added_By` VARCHAR(80),
`Added_By_Date` DATE,
`Nexx_Part` VARCHAR(60),
`Nexx_Rev`(15), <- HERE
`Nexx_Part_Description` VARCHAR(90),
`NCMR_Qty` VARCHAR(20),
`JO` VARCHAR(20),
`SN` VARCHAR(20),
`INV` VARCHAR(20),
`Nexx_Inventory_On_Hand` VARCHAR(20),
`Nexx_Inventory_Chk` VARCHAR(20),
`Supplier_Name` VARCHAR(60),
`Supplier_Number` VARCHAR(60),
`Manufacturer_Part_Number` VARCHAR(60),
`Manufacturer_Serial_Number` VARCHAR(60),
`NCMR_ID` VARCHAR(20),
`Nonconformity` MEDIUMTEXT,
`Disposition` MEDIUMTEXT,
`Comments` MEDIUMTEXT,
`CommentsAdditional_Details` MEDIUMTEXT,
`PO` VARCHAR(20),
`PO_Date` DATE,
`Date_Received` DATE,
`ncmrsr` MEDIUMTEXT,
`ncmrsc` MEDIUMTEXT,
PRIMARY KEY (`id`)
)

INSERT INTO ncmr VALUES (
`1`,
`1054`,
`Peter Teigeler`,
`7/7/2011`,
`K11205368`,
`1`,
`Assy, CMM Module w/window & Cover`,
`2`,
`I8778`,
`164`,
`N/A`,
`N/A`,
`Plastic Design Inc`,
`100255`,
`K11205386`,
`N/A`,
`Not made to print, missing 2 proximity sensor mouting brackets. These need to be welded in place.`,
`Return to vendor for rework, or have vendor come in and rework on site.`
`N/A`
`N/A`
`N/A`
`N/A`
`N/A`
);

you do not have a type defined in a spot..

 

I added

<- HERE

to the code for you to see it.

 

CREATE TABLE `ncmr`(
`id` INT AUTO_INCREMENT VARCHAR (11),
`Added_By` VARCHAR(80),
`Added_By_Date` DATE,
`Nexx_Part` VARCHAR(60),
`Nexx_Rev`(15), <- HERE
`Nexx_Part_Description` VARCHAR(90),
`NCMR_Qty` VARCHAR(20),
`JO` VARCHAR(20),
`SN` VARCHAR(20),
`INV` VARCHAR(20),
`Nexx_Inventory_On_Hand` VARCHAR(20),
`Nexx_Inventory_Chk` VARCHAR(20),
`Supplier_Name` VARCHAR(60),
`Supplier_Number` VARCHAR(60),
`Manufacturer_Part_Number` VARCHAR(60),
`Manufacturer_Serial_Number` VARCHAR(60),
`NCMR_ID` VARCHAR(20),
`Nonconformity` MEDIUMTEXT,
`Disposition` MEDIUMTEXT,
`Comments` MEDIUMTEXT,
`CommentsAdditional_Details` MEDIUMTEXT,
`PO` VARCHAR(20),
`PO_Date` DATE,
`Date_Received` DATE,
`ncmrsr` MEDIUMTEXT,
`ncmrsc` MEDIUMTEXT,
PRIMARY KEY (`id`)
)

INSERT INTO ncmr VALUES (
`1`,
`1054`,
`Peter Teigeler`,
`7/7/2011`,
`K11205368`,
`1`,
`Assy, CMM Module w/window & Cover`,
`2`,
`I8778`,
`164`,
`N/A`,
`N/A`,
`Plastic Design Inc`,
`100255`,
`K11205386`,
`N/A`,
`Not made to print, missing 2 proximity sensor mouting brackets. These need to be welded in place.`,
`Return to vendor for rework, or have vendor come in and rework on site.`
`N/A`
`N/A`
`N/A`
`N/A`
`N/A`
);

 

Fixed, and no go still.

 

CREATE TABLE `ncmr`(
`id` INT AUTO_INCREMENT,
`Added_By` VARCHAR(80),
`Added_By_Date` DATE,
`Nexx_Part` VARCHAR(60),
`Nexx_Rev` VARCHAR(15),
`Nexx_Part_Description` VARCHAR(90),
`NCMR_Qty` VARCHAR(20),
`JO` VARCHAR(20),
`SN` VARCHAR(20),
`INV` VARCHAR(20),
`Nexx_Inventory_On_Hand` VARCHAR(20),
`Nexx_Inventory_Chk` VARCHAR(20),
`Supplier_Name` VARCHAR(60),
`Supplier_Number` VARCHAR(60),
`Manufacturer_Part_Number` VARCHAR(60),
`Manufacturer_Serial_Number` VARCHAR(60),
`NCMR_ID` VARCHAR(20),
`Nonconformity` MEDIUMTEXT,
`Disposition` MEDIUMTEXT,
`Comments` MEDIUMTEXT,
`CommentsAdditional_Details` MEDIUMTEXT,
`PO` VARCHAR(20),
`PO_Date` DATE,
`Date_Received` DATE,
`ncmrsr` MEDIUMTEXT,
`ncmrsc` MEDIUMTEXT,
PRIMARY KEY (`id`)
)

You need to add ,'s to the last couple entries.

 

And then the column count is not correct. Did you forget to add some data?

 

It looks to me like you have 26 columns to enter data and you only enter 22 columns of data.

 

Edit: If you can supply what each field should go into. I can help a little more. Giving you the columns you have blank and making sure the order is correct.

Yea replace all the `backticks` with 'single quotes' and fix the values you insert (aka you are missing some) and it should work. You may to have reorganize them to insert into the correct columns but it should fix it.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.