Yii Framework Forum: [Solved]Gii show blank page when click preview Crud - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[Solved]Gii show blank page when click preview Crud Rate Topic: -----

#1 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 541
  • Joined: 21-June 10

Posted 13 July 2010 - 10:36 AM

I've never encountered this kind of problem before. So, I have a table which has quite a lot of fields (I wonder it's related or not). So my this is the table which the Yii unable to show the preview of the code :

CREATE TABLE IF NOT EXISTS `Mobil` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `nama` varchar(255) NOT NULL,
  `harga` decimal(15,5) NOT NULL,
  `deskripsi` varchar(1000) DEFAULT NULL,
  `tahun` year(4) DEFAULT NULL,
  `warna` varchar(50) DEFAULT NULL,
  `jarak_tempuh` varchar(50) DEFAULT NULL,
  `jenis_gigi` varchar(10) DEFAULT NULL,
  `jenis_bahan_bakar` varchar(20) DEFAULT NULL,
  `ukuran_mesin` varchar(10) DEFAULT NULL,
  `jumlah_pintu` int(11) DEFAULT NULL,
  `emisi_co2` int(20) DEFAULT NULL,
  `pajak_mobil` varchar(50) DEFAULT NULL,
  `garansi_kilometer` varchar(50) DEFAULT NULL,
  `garansi_tahun` varchar(50) DEFAULT NULL,
  `garansi_korosi` varchar(50) DEFAULT NULL,
  `garansi_cat` varchar(50) DEFAULT NULL,
  `konsumsi_bbm_urban` varchar(20) DEFAULT NULL,
  `konsumsi_bbm_extra` varchar(20) DEFAULT NULL,
  `konsumsi_bbm_combined` varchar(20) DEFAULT NULL,
  `0_62` varchar(50) DEFAULT NULL,
  `top_speed` varchar(20) DEFAULT NULL,
  `silinder` int(11) DEFAULT NULL,
  `valve` varchar(10) DEFAULT NULL,
  `engine_power` varchar(20) DEFAULT NULL,
  `engine_torque` varchar(20) DEFAULT NULL,
  `tinggi` varchar(20) DEFAULT NULL,
  `lebar` varchar(20) DEFAULT NULL,
  `lebar_termasuk_spion` varchar(20) DEFAULT NULL,
  `panjang` varchar(20) DEFAULT NULL,
  `berat_kotor` varchar(20) DEFAULT NULL,
  `kapasitas_bagasi_up` int(11) DEFAULT NULL,
  `kapasitas_bagasi_turun` int(11) DEFAULT NULL,
  `berat_max_bagasi` varchar(20) DEFAULT NULL,
  `berat_max_atap` varchar(20) DEFAULT NULL,
  `berat_derek_max_brake` varchar(20) DEFAULT NULL,
  `berat_derek_max_tanpa_brake` varchar(20) DEFAULT NULL,
  `berat_kerb` varchar(20) DEFAULT NULL,
  `turning_circle` varchar(20) DEFAULT NULL,
  `deskripsi_interior` varchar(1000) DEFAULT NULL,
  `deskripsi_exterior` varchar(1000) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


There are no any problems creating other table's CRUD. Only this table, any suggestion?
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#2 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 541
  • Joined: 21-June 10

Posted 15 July 2010 - 05:57 AM

I've found the source problem. There is one field named '0_62' causes the Yii error while I use yiic.
  `0_62` varchar(50) DEFAULT NULL,

So later I change the field's name to 'waktu_0_62' (starting with non-numeric), the problem is solved. No problem in using with gii.
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#3 User is offline   nishitha 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 28-August 13

Posted 28 August 2013 - 02:08 AM

I have a table mentioned in the blog tutorial.


CREATE TABLE tbl_post
(
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(128) NOT NULL,
content TEXT NOT NULL,
tags TEXT,
status INTEGER NOT NULL,
create_time INTEGER,
update_time INTEGER,
author_id INTEGER NOT NULL,
CONSTRAINT FK_post_author FOREIGN KEY (author_id)
REFERENCES tbl_user (id) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE tbl_comment
(
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
content TEXT NOT NULL,
status INTEGER NOT NULL,
create_time INTEGER,
author VARCHAR(128) NOT NULL,
email VARCHAR(128) NOT NULL,
url VARCHAR(128),
post_id INTEGER NOT NULL,
CONSTRAINT FK_comment_post FOREIGN KEY (post_id)
REFERENCES tbl_post (id) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;



My CRUD operation works for comment but for Post it shows a blank page.I checked it out.I don't have any fields starting with numeric characters or having spaces between them.please help me.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users