묻고답하기
이건 뭘까요? 정말 어처구니가 없네요.
2015.07.29 14:22
xe_documents테이블의 alter table xe_documents add f_name varchar(100)을 하고
insertDocument.xml에
<query id="insertDocument" action="insert" priority="LOW">
<tables>
<table name="documents" />
</tables>
<columns>
<column name="document_srl" var="document_srl" filter="number" notnull="notnull" />
<column name="module_srl" var="module_srl" filter="number" default="0" />
<column name="category_srl" var="category_srl" filter="number" default="0" />
<column name="lang_code" var="lang_code" default="" />
<column name="is_notice" var="is_notice" notnull="notnull" default="N" />
<column name="title" var="title" notnull="notnull" minlength="1" maxlength="250" />
<column name="title_bold" var="title_bold" default="N" />
<column name="title_color" var="title_color" default="N" />
<column name="content" var="content" notnull="notnull" />
<column name="readed_count" var="readed_count" default="0" />
<column name="blamed_count" var="blamed_count" default="0" />
<column name="voted_count" var="voted_count" default="0" />
<column name="comment_count" var="comment_count" default="0" />
<column name="trackback_count" var="trackback_count" default="0" />
<column name="uploaded_count" var="uploaded_count" default="0" />
<column name="password" var="password" minlength="2" maxlength="60" />
<column name="nick_name" var="nick_name" notnull="notnull" minlength="1" maxlength="40" />
<column name="member_srl" var="member_srl" default="0" filter="number" />
<column name="user_id" var="user_id" default="" />
<column name="user_name" var="user_name" default="" />
<column name="email_address" var="email_address" filter="email" maxlength="250" />
<column name="homepage" var="homepage" filter="homepage" default="" maxlength="250" />
<column name="tags" var="tags" />
<column name="extra_vars" var="extra_vars" />
<column name="regdate" var="regdate" default="curdate()" />
<column name="last_update" var="last_update" default="curdate()" />
<column name="last_updater" var="last_updater" />
<column name="ipaddress" var="ipaddress" default="ipaddress()" />
<column name="list_order" var="list_order" default="0" />
<column name="update_order" var="update_order" default="0" />
<column name="allow_trackback" var="allow_trackback" default="Y" />
<column name="notify_message" var="notify_message" default="N" />
<column name="status" var="status" default="PUBLIC" />
<column name="comment_status" var="commentStatus" default="ALLOW" />
<column name="f_name" var="f_name" default="" />
</columns>
</query>
을 하고 쿼리를 실행하면
[error] => No data supplied for parameters in prepared statement [error_list] => Array ( [0] => Array ( [errno] => 2031 [sqlstate] => HY000 [error] => No data supplied for parameters in prepared statement ) ) <column name="f_name" var="f_name" default="" /> 이걸빼면 error 0
필드를 인식 못하는듯 한데 새로 추가한 필드는 어떻게 인식 시키나요?
방법 좀 말씀해 주세요..
modules/document/schemas/documents.xml에도 새로운 필드를 추가해 주셔야 합니다.
</table> 위에 <column name="f_name" type="varchar" size="100" /> 를 추가하시면 됩니다.