Welcome Guest, Not a member yet? Register   Sign In
Scaffolding and MS SQL Express
#1

[eluser]polaris1927[/eluser]
I am new to CodeIgnitor so I am viewing the video tuorials which are very helpful.

I am having a problem recreating the "Blog in 20 min" tutorial.

When I create my scaffold and want to add a new record, the 'id' field is present in the form, eventhough I had defined it as a "Primary Key" field. In the video it it not present

Am I missing something here?

I am using MS SQL Express.

Thanks
#2

[eluser]Pascal Kriete[/eluser]
Did you make it auto-increment? If yes, you can just leave it blank and it should work anyways.
#3

[eluser]polaris1927[/eluser]
Yes, auto-increment was selected:

CREATE TABLE [dbo].[entries](
[id] [int] IDENTITY(1,1) NOT NULL,
[title] [varchar](128) NULL,
[body] [text] NULL,
CONSTRAINT [PK_primary] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
)

....and no, because it;s a primary key field, NULL are not permitted.

I have raised a bug report on this one. I'll have to examine the PHP code and find the problem.

Thanks for your response.




Theme © iAndrew 2016 - Forum software by © MyBB