コード例 #1
0
ファイル: Collection.cs プロジェクト: samuraicodes/Wen
        static private long InsertCollectionInDb(string name)
        {
            string sql = "INSERT IGNORE INTO "
                         + "collection(collectionName)"
                         + "VALUES(@one)";

            long id = DBconnection.ExecuteInsertReturnId(sql, name);

            return(id);
        }
コード例 #2
0
ファイル: Link.cs プロジェクト: samuraicodes/Wen
        static private long InsertLinkInDb(string name, string url, string description, int collection, int categorie)
        {
            string sql = "INSERT IGNORE INTO "
                         + "link(linkName, linkUrl, linkDescription, linkCollectionFk, linkCategorieFk)"
                         + "VALUES(@one, @two, @three, @four, @five)";

            long id = DBconnection.ExecuteInsertReturnId(sql, name, url, description, collection, categorie);

            return(id);
        }