Yii Framework Forum: activeRadioButtonList - Yii Framework Forum

Jump to content

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

activeRadioButtonList Rate Topic: -----

#1 User is offline   kitty10 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 139
  • Joined: 13-April 10

Posted 10 May 2010 - 05:32 AM

CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 2290 OCIStmtExecute: ORA-02290: check constraint (ORA02.AVCON_1054816703_LODE__000) violated

My code is
<div class="row" align="left">
		<?php echo CHtml::activeLabelEx($model,'LODE_TITOLO'); ?>
		<br />
		<?php echo CHtml::activeRadioButtonList($model,'LODE_TITOLO',array(1=>'SI',2=>'NO'),array('size'=>2,'maxlength'=>2,'separator'=>'  '));?>
		<?php echo CHtml::error($model,'LODE_TITOLO'); ?>
	</div>


I do not understand why if I use the activeRadioButtonList problems to enter the value in the db ... if not ... a activeTextField data is entered correctly ..

<div class="row" align="left">
		<?php echo CHtml::activeLabelEx($model,'LODE_TITOLO'); ?>
		<br />
		<?php echo CHtml::activeTextField($model,'LODE_TITOLO');?>
		<?php echo CHtml::error($model,'LODE_TITOLO'); ?>
	</div>

This code work correctly..
-1

#2 User is offline   zaccaria 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 2,232
  • Joined: 04-October 09
  • Location:Moscow

Posted 13 May 2010 - 05:17 AM

Try to check what are you retriving in the model. Maybe activeRadioButtonList return a set if value and not a single value.
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