1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
|
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
|
-
+
-
+
|
const char*s=screen_prompt("Copy from:");
int i;
sqlite3_set_last_insert_rowid(userdb,0);
if(!s || !*s) return 0;
if(sqlite3_prepare_v2(userdb,"INSERT INTO `PICEDIT`(`NAME`,`TYPE`,`DATA`) SELECT VALID_NAME(?2)||SUBSTR(`NAME`,-4),`TYPE`,`DATA` "
"FROM `PICEDIT` WHERE SUBSTR(`NAME`,1,LENGTH(`NAME`)-4)=?1 AND `TYPE`<>0;",-1,&st,0)) {
screen_message(sqlite3_errmsg(userdb));
return;
return 0;
}
sqlite3_bind_text(st,1,s,-1,SQLITE_TRANSIENT);
s=screen_prompt("Copy to:");
if(!s || !*s) {
sqlite3_finalize(st);
return;
return 0;
}
sqlite3_bind_text(st,2,s,-1,SQLITE_TRANSIENT);
i=sqlite3_step(st);
sqlite3_finalize(st);
if(i==SQLITE_DONE) {
return sqlite3_last_insert_rowid(userdb);
} else {
|