Index: openacs.org-dev/www/bboard-migr/faq-migr.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs.org-dev/www/bboard-migr/faq-migr.tcl,v
diff -u -r1.1 -r1.2
--- openacs.org-dev/www/bboard-migr/faq-migr.tcl 2 Aug 2002 14:39:09 -0000 1.1
+++ openacs.org-dev/www/bboard-migr/faq-migr.tcl 5 Aug 2002 21:41:54 -0000 1.2
@@ -1,38 +1,40 @@
set olddb [ns_db gethandle acs32]
-set old_faq_id 6
+set old_faq_id 15
set user_id [ad_conn user_id]
set creation_ip [ns_conn peeraddr]
-set selection [ns_db select $olddb "
-select * from faq_q_and_a where faq_id = $old_faq_id"]
+set selection [ns_db select $olddb "select * from faq_q_and_a where faq_id = $old_faq_id"]
db_transaction {
while { [ns_db getrow $olddb $selection] } {
set_variables_after_query
- set faq_id 43840
+ set faq_id 43842
set entry_id [db_nextval acs_object_id_seq]
+
+ db_exec_plsql create_q_and_a {
select faq__new_q_and_a (
- $entry_id,
- $faq_id,
+ :entry_id,
+ :faq_id,
:question,
:answer,
:sort_key,
'faq_q_and_a',
now(),
- $user_id,
- $creation_ip,
- $faq_id
+ :user_id,
+ :creation_ip,
+ :faq_id
);
-
- append html "adding entry_id: $entry_id
"
+ }
+ append output "adding entry_id: $entry_id
"
+
}
} on_error {
set output "
$errmsg" } ns_db releasehandle $olddb -ns_return 200 text/html $html +ns_return 200 text/html $output